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?
4 thoughts on “Maybe missing INTERNET permission?”
Easy enough to misunderstand this message. Good explain on the manifest – cheers 🙂
Nice tip, thanks!
That manifest stuff is easy to miss at times 🙂
I keep forgetting to add services all the time. Too used to WP7 coding I think…