-1

i wonder how to get address of a page inside of a web view on user click, and take that address and open it inside phone browser. for example let's say i open google inside a web view and when i click on one of the links from search then i want to fetch that link and get open it inside phone browser. the code for the web view is as follows:

myWebView = (WebView) findViewById(R.id.webView1);
    myWebView.setWebViewClient(new WebViewClient());         
    myWebView .getSettings().setJavaScriptEnabled(true);
    myWebView .getSettings().setDomStorageEnabled(true);
    myWebView.getSettings().setJavaScriptEnabled(true);
    myWebView.getSettings().setSupportZoom(false);
    myWebView.getSettings().setDomStorageEnabled(true);
    myWebView.getSettings().setBuiltInZoomControls(true);
    myWebView.loadUrl("http://www.google.com/");
user3124780
  • 83
  • 1
  • 9
  • Possible duplicate of http://stackoverflow.com/questions/2201917/how-can-i-open-a-url-in-androids-web-browser-from-my-application – Wagner DosAnjos Sep 08 '14 at 19:53

1 Answers1

0

you can inject javascript that will find the link and call function from your java activity with android java bridge like How to call javascript from Android?

Community
  • 1
  • 1
Noam Wies
  • 54
  • 4