Closed tsquaredesigns closed 4 years ago
in the normal webview we can try this, but I have no idea about this AdvancedWebView
@Override public boolean shouldOverrideUrlLoading(WebView wv, String url) { if(url.startsWith("tel:") || url.startsWith("whatsapp:")) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(url)); startActivity(intent); return true; } return false; }
Thanks!
Your solution, wrapped inside myWebView.setWebViewClient(new WebViewClient() { /* ... */ });, is indeed correct and also applicable with this library.
myWebView.setWebViewClient(new WebViewClient() { /* ... */ });
in the normal webview we can try this, but I have no idea about this AdvancedWebView
@Override public boolean shouldOverrideUrlLoading(WebView wv, String url) { if(url.startsWith("tel:") || url.startsWith("whatsapp:")) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(url)); startActivity(intent); return true; } return false; }