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