Issue
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
Solution
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....
Answered By - Its not blank
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.