BooDoo BooDoo - 2 years ago 146
Android Question

Block a site in webview

In my apps webview i want to block some sites that users should not enter. For example how can i block all google sites (.com .fr etc.) without using


because some urls contain the word google but they dont browse to the site. For example:

Here is my code

web.setWebViewClient(new WebViewClient(){

public void onPageStarted(WebView webView, String webUrl, Bitmap favicon) {

if(webUrl.contains("google")){//not works good

super.onPageStarted(webView, webUrl, favicon);



Answer Source

Use this hope it helps

//block site

You don't need to do something more from that

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download