In Android, is it possible to block apps from accessing the Internet? Many apps will often connect to remote servers in the background, including Google's own apps or system services. Over time this can eat away at a user's data limit set by a mobile carrier. Does Android allow an app to act as a firewall whereby the user can select which apps have access to the Internet? Or does the device have to be rooted to have that ability?
migrated from stackoverflow.com Mar 6 at 13:40
If you don't have root access on the device, then you can use mobiwol to control the access various apps have to the Internet. Mobiwol creates a 'virtual' VPN connection on the device which allows control of the individual app connections. However, although the app starts when the device starts it is possible that there may be a brief period prior to Mobiwol executing in which apps could get Internet access despite the Mobiwol configuration.
If you have root access, there are more alternatives:
Well I would personally have a service running where I can get the currently running application like here
Also what you can do is that you can turn the mobile packet data off if the activity is the one which you want to block
like here in this example
except for this method I don't think there is a easy way you can deny internet to a application because it requested for it at the time of download itself.