I have a Android Webview and when I click on a link to download a file (image of pdf etc) I got a error message.
Error message:
Cannot call determinedVisibil
I found a workaround by using onPageFinished
method instead of shouldOverrideUrlLoading
. It also provides the needed URL in the list of arguments.
The only trick is to set a check so that the main logic of the method (in my case making a Toast) is not triggered when onPageFinished
gets called on the the page load itself.