I'm trying to turn off the android radio programmatically. I'm trying to use the ServiceState class, but it wont work. I added the permission CHANGE_NETWORK_STATE and MODIFY_PHONE_STATE
. Still no luck. any ideas?
Asked
Active
Viewed 740 times
1
-
See http://stackoverflow.com/a/5533943/165674 – Dheeraj Vepakomma Jul 09 '12 at 13:19
-
Airplane mode will disable radio and wifi, i simple want to turn off just the radio – nwnoga Jul 09 '12 at 13:34
1 Answers
1
Permission MODIFY_PHONE_STATE
is a system permission, thus, you cannot use it in your application.
EDIT:
Ok. I'll try to explain. The service method to turn on and turn off radio programatically is protected with MODIFY_PHONE_STATE permission. This permission has signature type, thus, only applications that have the same signature can invoke this method. Thus, so as your application is not signed with the system certificate you cannot use this permission in your application. But without this permission you also cannot change the state of the radio.

Yury
- 20,618
- 7
- 58
- 86