title: Why my android TCP client app wont work on other phones??
body: <p>I am using an android phone with an android version 4.1.1.
  .IT WORKS PROPERLY. I can transmit string data from this phone to my VB application in my PC via TCP/IP. However if I use my other phone, with an android version 4.4.4 kitkat .. I can still install the .apk file properly and run it..but it wont do its functions , same goes for my other phone 4.0.1. </p>
  
  <p>here's my code:</p>
  
  <p>XML file:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  &gt;
  &lt;TextView
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:text="hello"
      /&gt;
  &lt;EditText
      android:id="@+id/textout"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      /&gt;
  &lt;Button
      android:id="@+id/buttonSend"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:text="Send"
      /&gt;
  &lt;TextView
      android:id="@+id/textin"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      /&gt;
  </code></pre>
  
  <p></p>
  
  <p>JAVA file:</p>
  
  <pre><code>public class MainActivity extends Activity {
  
  EditText textOut;
  TextView textIn;
  
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      textOut = (EditText)findViewById(R.id.textout);
      Button buttonSend = (Button)findViewById(R.id.buttonSend);
      textIn = (TextView)findViewById(R.id.textin);
      buttonSend.setOnClickListener(buttonSendOnClickListener);
  
  
  
  
  }
  
  Button.OnClickListener buttonSendOnClickListener
          = new Button.OnClickListener(){
  
      @Override
      public void onClick(View arg0) {
  
          // TODO Auto-generated method stub
          Socket socket = null;
          DataOutputStream dataOutputStream = null;
          DataInputStream dataInputStream = null;
  
          try{
              // Creating new socket connection to the IP (first parameter) and its opened port (second parameter)
              Socket s = new Socket("192.168.1.3", 65535);
  
              // Initialize output stream to write message to the socket stream
              BufferedWriter out = new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));
  
              String outMsg = "";
  
              outMsg = textOut.getText().toString();
  
              // Write message to stream
              out.write(outMsg);
  
              // Flush the data from the stream to indicate end of message
              out.flush();
  
              // Close the output stream
              out.close();
  
              // Close the socket connection
              s.close();
          }
  
          catch(Exception ex){
              //:TODO Handle exceptions
          }
      }};
  </code></pre>
  
  <p>}</p>
  
  <p>Does it have anything to do with API levels ? minsdkversion and targetsdkversion?
  PLEASE HELP ME.. IM GOING CRAZYYY . HAHA XD Thanks in advance.</p>