5

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).

John
  • 15,418
  • 12
  • 44
  • 65
  • 2
    no, bad! put down the keyboard and walk away! – Will Tate Feb 25 '11 at 17:25
  • ok ok I can kind of see the use in a parental control app, but you could see obvious issues behind "i want to restrict apps x, y and z from accessing " but your heart seem to be in the right place and i rescind my previous statement :] – Will Tate Feb 25 '11 at 17:34
  • Interesting. May I ask what the purpose of this app is? – user670186 Feb 22 '12 at 00:54
  • @user670186 Parental control, like I said. In would defeat the purpose of having filtering in a browser if they could just download a different browser. – John Feb 22 '12 at 02:38
  • https://play.google.com/store/apps/details?id=com.netspark.firewall&hl=en – Pratik Butani Jul 27 '13 at 06:30
  • https://play.google.com/store/apps/details?id=com.rootuninstaller.firewall&hl=en – Pratik Butani Jul 27 '13 at 06:31

4 Answers4

1

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.

mauris
  • 42,982
  • 15
  • 99
  • 131
  • +1 - Good idea, I never thought of the hosts file. Very simple and easy. – BG100 Feb 25 '11 at 17:31
  • I don't think that will work for me. I want certain apps to have NO internet access, yet I want another app to have internet access. – John Feb 25 '11 at 17:35
1

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.

BG100
  • 4,481
  • 2
  • 37
  • 64
  • I already created my own browser with filtering, blacklist, etc. Now I just need to prevent the user from simply opening another browser. My current filtering cannot be shut off without a password and I also scan more than just the URL in deciding allowed/blocked. That said, [I've already looked at creating a proxy with no results.](http://stackoverflow.com/questions/5060031/route-website-through-android-app) – John Feb 25 '11 at 17:40
1

You can use DroidWall for black and white listing. just what you wanted: You need root access!

Review:

http://dottech.org/mobile/android/free-android-app-reviews/21485/android-root-required-block-apps-from-accessing-the-internet-with-droidwall/

Download:

http://code.google.com/p/droidwall/

ihsan
  • 11
  • 1
  • Some apps like Juice Defender Ultimate do it. We can configure which app is allowed to connect to the internet. – Rajkiran Jul 10 '12 at 07:07
-2

install Mobiwol: NoRoot Firewall, it's light app, and you there is nothing to do with ROOT, very effective.

https://play.google.com/store/apps/details?id=com.netspark.firewall&hl=en

Pramod
  • 7
  • 1
  • 1
  • 3