What permission do I need to access Internet from an Android application?

Janusz picture Janusz · Mar 4, 2010 · Viewed 617.3k times · Source

I get the following Exception running my app:

java.net.SocketException: Permission denied (maybe missing INTERNET permission)

How do I solve the missing permission problem?

Answer

Nikola Smiljanić picture Nikola Smiljanić · Mar 4, 2010

Add the INTERNET permission to your manifest file.

You have to add this line:

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

outside the application tag in your AndroidManifest.xml