Android WebView “tel:” links show web page not found

OK so I solved the issue I think. I just needed to separate the URL overrides as follows:

public boolean shouldOverrideUrlLoading(WebView view, String url) {
    if (url.startsWith("tel:")) { 
        Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse(url)); 
        startActivity(intent);
        view.reload();
        return true;
    }

    view.loadUrl(url);
    return true;
}

Now my regular links work as well as the tel links. I can also add in there for geo: links if I need to and it will not give me the issue that I was having before to open up maps on the phone.

Leave a Comment