我如何编写应用程序来阻止Android上的特定网站?

时间:2010-10-03 17:31:14

标签: android filter google-tv

我正在考虑为Android编写一个互联网过滤器应用程序,这将允许家长在他们孩子的手机上阻止令人反感的网站。我认为这对GoogleTV来说也很有用。我怎么会开始?是否可以阻止访问特定网站而无需用户根电话?

我猜我可以用iptables来做,但这可能需要一部root电话。

修改

如果手机扎根了,怎么会这样做呢? ip表是可行的还是有更好的方法?

3 个答案:

答案 0 :(得分:2)

抱歉,申请无法执行此操作。

答案 1 :(得分:2)

鉴于您可以找到isAllowed(Url),您可以使用WebView加载新页面。虽然在我编写它时,您可能需要比WebView更强大的浏览器,http://androidcommunity.com/forums/f4/how-open-a-new-screen-to-display-a-web-page-141/可能会有所帮助。

答案 2 :(得分:1)

您可以为某个网址设置intent-filter(使用http方案)。通过这种方式,如果用户浏览器位于已识别的网址上,则会启动您的应用而不是网页。

这里有更多细节: http://developer.android.com/guide/topics/intents/intents-filters.html#ifs 和这里: http://developer.android.com/guide/topics/manifest/data-element.html

此致 帕特里克