Android Webview: Cannot call determinedVisibility() - never saw a connection for the pid

前端 未结 11 970
南笙
南笙 2020-12-01 14:11

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         


        
11条回答
  •  执笔经年
    2020-12-01 14:46

    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.

提交回复
热议问题