I have a WebView that I'm trying to handle behavior for when #close is added to the end of a url.
The code below triggers for every load url that doesn't have #close appended to it. How do I handle for this?
WebViewClient wvc = new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url){
return true;
}
@Override
public void onLoadResource(WebView view, String url){
if( url.equals("https:<coreofurl>/?#close") ){
// handle event - does not enter
}
}
};
webView.setWebViewClient(wvc);
Edit: I've also tried the following with no luck.
WebChromeClient wcc = new WebChromeClient() {
@Override
public void onCloseWindow(WebView window) {
// handle event - does not enter
}
};
webView.setWebChromeClient(wcc);