Had a small problem consuming a REST service in my Android client today, the error message I got was:
java.net.SocketException: Permission denied (maybe missing INTERNET permission)

After trying to figure out if my URI was badly formated I realized it was an Android device issue. To enable your Android app to access the internet (and subsequently use HttpClient calls) you need to add the INTERNET permission to the apps manifest.

Outside of the application tag just add the following:
<uses-permission android:name="android.permission.INTERNET" />

Who would have thought just reading the error message properly would have solved the problem?

Maybe missing INTERNET permission?
Tagged on:         

4 thoughts on “Maybe missing INTERNET permission?

  • March 3, 2011 at 05:27

    Easy enough to misunderstand this message. Good explain on the manifest – cheers 🙂

  • May 4, 2011 at 22:29

    That manifest stuff is easy to miss at times 🙂

    • May 6, 2011 at 22:51

      I know!

      I keep forgetting to add services all the time. Too used to WP7 coding I think…


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.