title: secure socket communication in android
body: <p>I am trying to setup secure socket communication to a server. I have successfully tried the Socket class, but that is not a secure way of communication. From what I gather, SSLSocketFactory and SSLSocket is required for securing communication via sockets. How do i go about implementing these?</p>
  
  <p>I used this code</p>
  
  <pre><code>SSLSocketFactory s = new SSLSocketFactory();
  socket = s.createSocket(url, port);
  </code></pre>
  
  <p>but eclipse says i cannot instantiate SSLSocketFactory.</p>