androidurlwebview

how to get the current page url from the web view in android


Using webview.loadUrl(url) method I open an url. If I click any Button on the view it directs to another page. Now I want to get the url of the directed page. how can I get it?

I also want the content that is displayed on the webview. How to get the content of the WebView ?


Solution

  • String webUrl = webView.getUrl();