In my app I want the user to create a blacklist of apps that will not be allowed internet access. How might I prevent certain other apps from accessing the internet?
It's a parental control app. I want to make sure only the browser with filtering is allowed internet access and not any other browsers(other apps are OK, just not browsers).
Like what Ad Free
is doing, you can go on with a root access and edit the host file to block the websites related to or used by the apps.
I think you could maybe create a proxy application that runs as a background service. You could then set your browser up to use localhost as the proxy server.
The service will have to listen on port 80 for HTTP requests from the browser, create a real internet request, download the content and post it back to the browser in it's response.
You could then filter and deny any unwanted requests by looking at the URL that the browser is requesting.
There are a few problems with this though, the main one being there is nothing to stop the user from turning off the proxy themselves.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With