When clinking on an address in the browser, it will open a map view for the address.
How do I set shouldOverrideUrlLoading to handle these links in a WebView? I have setup handling of "tel:" and "mailto:" links, but can't figure out how to handle "geo:" links.
My shouldOverrideUrlLoading:
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url.startsWith("tel:")) {
startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse(url)));
return true;
} else if (url.startsWith("mailto:")) {
url = url.replaceFirst("mailto:", "");
url = url.trim();
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("plain/text").putExtra(Intent.EXTRA_EMAIL, new String[]{url});
startActivity(i);
return true;
} else if (url.startsWith("geo:")) {
return true;
} else {
view.loadUrl(url);
return true;
}
}