Android WebView "tel:" links show web page not found -
i trying android webview app open tel: links phone. every time open telephone link works great , opens phone. once done call , go app @ page says "web page not found tel:0000000000". have hit button once more page clicked telephone number on.
is there way open tel link without trying find page in webview opening on phone?
this code using in webview override handling of tel , mailto links:
public boolean shouldoverrideurlloading(webview view, string url) { if (url.startswith("mailto:") || url.startswith("tel:")) { intent intent = new intent(intent.action_view, uri.parse(url)); startactivity(intent); } view.loadurl(url); return true; } any appreciated. have spent last 2 hours scouring goodle , have failed produce answers.
ok solved issue think. needed separate url overrides 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 regular links work tel links. can add in there geo: links if need , not give me issue having before open maps on phone.
Comments
Post a Comment