views:

163

answers:

1

I need to develop an application that will check whether the phone is in roaming. If it's in roaming then the application should block internet for all applications except several from white list. In non-roaming mode it should allow all requests. There should be no way for user to kill or suspend the application or turn internet on.
I'm not familiar with android much so I really don't know whether it possible to implement without modification of OS. Is there any way to do this?

+3  A: 

There is a system setting for this which is disabled by default.

For normal user phones - You cannot enable this setting programmatically.

For rooted phones - You can enable this setting programmatically provided your app is in the system apps folder

There's no way to tinker with the OS at a level where you can selectively enable and disable the accessibility of the network to certain applications. The only way out is to modify the OS.

Prashast
As an alternative though you could check that the device is roaming and check that using data services is on and warn the user and then allowing them to switch it off manually
Donal Rafferty