With the simple below code I can get my url loaded correctly, but, I get \"ERR_UNKNOWN_URL_SCHEME\" when trying to tap on html links that starts with mailto: wh
mailto
links will not get loaded in your webview
.You have check for it like this in shouldOverrideUrlLoading
and handle it with intent
.
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url.startsWith("mailto:")) {
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("text/plain");
share.putExtra(Intent.EXTRA_TEXT, message);
startActivity(Intent.createChooser(share, "Title of the dialog the system will open"));
view.reload();
return true;
}
}
Similar question Android Webview ERR_UNKNOWN_URL_SCHEME Error