I have a link which contains collection of books (for eg. www.bookstore.com), from which I select one book (with URL www.bookstore.com/book1.epub) which should be downloaded to my library when user clicks on Download button of that book.
I'm done with download part but what is bothering to me is How will I get the URL of specific book which has been selected by user to download i.e. www.bookstore.com/book1.epub ?
I tried with webView.getUrl()
, but it doesn't get fired at all except for first load when it's null.
Any help appreciated.
You just need to implement
WebViewClient
.Where inside
shouldOverrideUrlLoading()
, you will be having current URL:Read more about WebView and WebViewClient => WebView | Android Developer