I had this problem too ... when creating against an earlier API, I just got an unhandledException that I noticed when going through getAllNetworkInfo() or getActiveNetworkInfo() . However, nothing was shown in logcat. When creating against the latest API (22), I got the above SecurityException .
For me, the solution turned out to be that I wrote
<uses-permission android:name="ANDROID.PERMISSION.INTERNET" /> <uses-permission android:name="ANDROID.PERMISSION.ACCESS_NETWORK_STATE" />
when i needed
<uses-permission android:name="ANDROID.PERMISSION.INTERNET" /> <uses-permission android:name="ANDROID.PERMISSION.ACCESS_NETWORK_STATE" />
So, for any developer experiencing this problem and scratching his head, note that these permission names are case sensitive!
astyanaxas
source share