I've developed a small group of .html pages that are stored in a server. My android app, using a webview with: setWebChromeClient loads these pages. minSdkVersion 19 targetSdkVersion 24
The problem: Everytime I need to load a new page, using a link in my .html page, the new page is opened in an external browser.
Url Overriding I know about the shouldOverrideUrlLoading() method, when we're using the setWebViewClient(). But unfortunately I can't use the normal webview. I need to use the WebChromeClient() because of some feature that only work with this one. (Like the input file)
My doubt is... How can I override my URL to force them to load inside of the webChromeClient? I tried this but with no luck:
webView.setWebChromeClient(new WebChromeClient() {
// (...)
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});