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
WebViewClient? Also, why not use theshouldInterceptRequest()-method, which sounds more like what you want.shouldOverrideUrlLoadingmethod and return true, get the URL will be loading, if it's in your black list, then load your ownwarning viewshouldInterceptRequest()method worked as well asshouldOverrideUrlLoading()I did some parsing on received urls from above methods and it worked. :)