Using a WebViewClient should be enough. We've had no problems with API level 19. For example:
WebView webView = new WebView(this);
String html = "<html><body><a href=\"showmessage:hello%20there\">Test it</a></body></html>";
webView.loadData(html, "text/html", "utf-8");
webView.setWebViewClient(new WebViewClient()
{
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
if (url.startsWith("showmessage"))
{
Toast.makeText(MainActivity.this, url, Toast.LENGTH_SHORT).show();
return true;
}
return false;
}
});