Archive for January, 2009

Android network access and documentation

Sunday, January 4th, 2009

I have spent around 5 hours trying to understand why opening a simple Socket return an “unknown Error” exception.

A quick search (after the 5 hours) has proved very helpful, as it turns out there is a permission system in Android which should be defined for each Activity/Application.

So, if I need Internet access in my activity, I should clearly state that:

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

The only problem it doesn’t work… so I am still searching for some CLEAR documentation on how to do it.

Google – Please properly document your product. Please put in Java.net.Socket documentation some kind of warning or link to permission information.

Well… I should also read the Security model more carefully (but who really does that?)