0

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!

Jack
  • 89
  • 3
  • 12

1 Answers1

0

Try something like this

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

or if you need to override Webview link click use this

@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
    view.loadUrl(url);
    return true;

This should do the trick

skryshtafovych
  • 572
  • 4
  • 16