1

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?

Nikhil
  • 16,194
  • 20
  • 64
  • 81
nwnoga
  • 577
  • 3
  • 12
  • 22

1 Answers1

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