I am trying to intercept the url click in my webview. I want to block certain urls from getting launched when they are clicked in webview.
For that I am overriding shouldOverrideUrlLoading
method. But still what ever is return true/false
that url is getting launched.
e.g if i want to block http://www.xyz.com
I am able to get the url string and able to varify it with my black list urls but it is getting launched irrespective of return value.
I may be wrong at approach I need suggestion
try something like this
@Override
public boolean shouldOverrideUrlLoading(WebView wView, String url)
{
if(url.equals("from your list")){
//DO something
}
return true;
}
however i dont quite remeber the boolean value.just give it a try....
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