title: How to connect a mobile application from your android mobile device to your laptop server using sockets?
body: <p>I have a very simple Java server that runs on my laptop. On the other side i have my Tablet with also a very simple client to conect to my server but it is not working.
  Both are running on the same wireless network. </p>
  
  <p>Sample of the Server
          ServerSocket serverSocket = null;
          Socket socket = null;
          DataInputStream dataInputStream = null;
          DataOutputStream dataOutputStream = null;</p>
  
  <pre><code>    try {
          serverSocket = new ServerSocket(8888);
          System.out.println("Listening :8888");
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  
      while(true){
          try {
              socket = serverSocket.accept();
              dataInputStream = new DataInputStream(socket.getInputStream());
              dataOutputStream = new DataOutputStream(socket.getOutputStream());
              System.out.println("ip: " + socket.getInetAddress());
              System.out.println("message: " + dataInputStream.readUTF());
              dataOutputStream.writeUTF("Hello!");
  </code></pre>
  
  <p>Simple client code:</p>
  
  <pre><code>mysock = new Socket(server_adress, port_number);
  </code></pre>
  
  <p>Ive tried setting the manifest WIFI permissions. Tried shutting down the computer firewalls.
  Is there something  i should know regarding how the wireless conection works that might be blocking the conection? </p>
  
  <p>Thanks in advance</p>