Java Android socket works on Computer, not phone
I've made a socket client application for android (and the server in cobol).

**The application works perfectly fine from 1 PC to another**(with the eclipse android emulator), but it **doesnt work between that same computer, and my android phone.** 

Heres the code in which my program fails:

    BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    Vector<String> v = new Vector<String>();
    int i = 0;
    Boolean KeepGoing = true;
    while (KeepGoing)
	{
		
 	  try 
	      {
		v.add(new String(in.readLine()));
		i++;
	      }
	  catch (Exception e)
	      {
		KeepGoing = false;
              }
       }

**It fails in the try/catch shown above**. This is a part of the method thats called when a button is pressed. 
Before this, it creates the socket, sends a request, and that code is when it listens for the answer. 

I do have the internet, debuggable and testonly statement in the manifest:

    <uses-permission android:name="android.permission.INTERNET" />

&

    android:debuggable="true" 
    android:testOnly="false" >

The application is made for Android 2.3.3 if that makes a difference. 

Thanks for your time.


Java Android socket works on Computer, not phone
===

I've made a socket client application for android (and the server in cobol).

**The application works perfectly fine from 1 PC to another**(with the eclipse android emulator), but it **doesnt work between that same computer, and my android phone.** 

Heres the code in which my program fails:

    BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    Vector<String> v = new Vector<String>();
    int i = 0;
    Boolean KeepGoing = true;
    while (KeepGoing)
	{
		
 	  try 
	      {
		v.add(new String(in.readLine()));
		i++;
	      }
	  catch (Exception e)
	      {
		KeepGoing = false;
              }
       }

**It fails in the try/catch shown above**. This is a part of the method thats called when a button is pressed. 
Before this, it creates the socket, sends a request, and that code is when it listens for the answer. 

I do have the internet, debuggable and testonly statement in the manifest:

    <uses-permission android:name="android.permission.INTERNET" />

&

    android:debuggable="true" 
    android:testOnly="false" >

The application is made for Android 2.3.3 if that makes a difference. 

Thanks for your time.

