Hamidreza Samadi Hamidreza Samadi - 1 year ago 110
Android Question

Opening WebView links in default browser

I want to open my

links in default browser. I used this code but it did not work. Even the log did not show up.

webView.setWebViewClient(new WebViewClient(){
public boolean shouldOverrideUrlLoading(WebView view, String url) {

new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
return true;

Answer Source

in the source of WebView define http:// as link prefix.


<a href="http://yourdomain.x/">..</a>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download