Jack Jack - 1 year ago 96
Android Question

Open a link on WebView

I am using WebView on my application.
the WebView contains a web site with link.
When I am clicking on the link, it is open the link on the application(By webView).
How can I open the link with the browser?
Thank you!

Answer Source

Try something like this

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

or if you need to override Webview link click use this

public boolean shouldOverrideUrlLoading(WebView view, String url) {
    return true;

This should do the trick

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download