Question

I am making an app.I want the app to enable data connection(3G) on its own on android 2.2 and earlier devices.I added the permissions but i get errors "Permission is only granted to system app"..Could someone tell me how to overcome this.THIS HAS TO WORK ON NON_ROOTED PHONES..These are the permissions i added

android.permission.CHANGE_NETWORK_STATE

android.permission.CHANGE_NETWORK_STATE    

android.permission.ACCESS_NETWORK_STATE

android.permission.MODIFY_PHONE_STATE

android.permission.READ_PHONE_STATE

if there's any alternative method its highly welcome

Was it helpful?

Solution

I had this problem in my last project and the approach we had to end up using, also according to Google's way to handle this issue was to pop up the Setting->Mobile Networks Activity in front of the user, so he could explicitly enable it, not only for requirement reasons but also for Legal Term issues because if your app consumes 3G data making the user spend money without his knowledge, you can get in legal problems...

Regards!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top