1: …… 2: public void onCreate(Bundle savedInstanceState) { 3: int port = 443; 4: String hostname = "hostname"; 5: SocketFactory socketFactory = SSLSocketFactory.getDefault(); 6: Socket socket = socketFactory.createSocket(hostname, , port); 7: InputStream in = socket.getInputStream(); 8: OutputStream out = socket.getOutputStream(); 9: // Read from in and write to out... 10: in.close(); 11: out.close(); 12: }