Android Webview "Tel:" Links Show Web Page Not Found

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.

Clicking on email address loads it as a webpage as well on webview

Try with using return true; in shouldOverrideUrlLoading() method. :)



Related Topics



Leave a reply



Submit