0

I'm considering writing an internet filter app for Android which would allow parents to block objectionable web sites on their children's phones. I'm assuming this would also be useful on GoogleTV when it comes out. How would I even start? Is it possible to block access to specific sites without requiring the user to root their phone?

I'm guessing I could do it with iptables, but that would probably require a rooted phone.

Edit:

If the phone was rooted, how would one go about doing this? Are ip tables the way to go or is there a better way?

Jay Askren
  • 10,282
  • 14
  • 53
  • 75

3 Answers3

2

Sorry, an application can't do this.

hackbod
  • 90,665
  • 16
  • 140
  • 154
  • I agree, that it can't be done on the app layer. Even though if you would have managed to block the URLs, the phone user could simply uninstall the app and hence remove the protection. Imho the way to go is to root it and have the parents install the app on the system partition which at least makes it hard(er) to uninstall it via the phone directly – Tseng Oct 04 '10 at 15:40
2

Given you can find isAllowed(Url) you can use WebView to load a new page. Although as I write it, you might want a more powerful browser than WebView, http://androidcommunity.com/forums/f4/how-open-a-new-screen-to-display-a-web-page-141/ might be helpful.

  • On second thoughts, can you change the dns server settings for the browser. –  Oct 04 '10 at 05:02
  • Yes, but it requires the phone to be rooted: http://blog.varunkumar.me/2010/09/how-to-change-dns-server-on-android.html – Jay Askren Oct 04 '10 at 08:20
1

You can set an intent-filter for some url (using http scheme). By this way, if user browser on an identified url, your app will be launched instead of the webpage.

more details here: http://developer.android.com/guide/topics/intents/intents-filters.html#ifs and here: http://developer.android.com/guide/topics/manifest/data-element.html

Regards, Patrick

Patrick
  • 425
  • 4
  • 15