Abdullah Abdullah - 9 months ago 336
Android Question

Denied starting an intent without a user gesture Webview Android

Trying to redirect local html page in android webview using Javascript redirect, gets denied starting an intent in Logcat:

Testing on android 5.1.1

document.location = "index.html";

Denied starting an intent without a user gesture, URI:


Answer Source

I read the documentation in 1,000 attempts Android.developer and this was my solution

I do not know if you understand, I speak Spanish

webView.setWebViewClient(new WebViewClient() {
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        return false;