Anil Maddala
Anil Maddala

Reputation: 908

Android TCP Socket

I am trying to create a new TCP socket in Android emulator. Below is the Android code:

Socket s = new Socket("111.221.88.15", 8080);

But i keep getting UnknownHost Exception. I am able to create the connection in a windows C# application.

The site is a test project, developed in Microsoft Azure. URL:http://tcptest24.cloudapp.net/

I tried using the URL in place of IP address and various variants of it, but i keep getting the same error.

Hopefully ill get an early response as I am being charged :) and the site is of no use without client.

Thanks, Anil

Upvotes: 3

Views: 3035

Answers (1)

MByD
MByD

Reputation: 137322

You need to add the INTERNET permission to your manifest.

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

Upvotes: 9

Related Questions