Webview shouldOverrideUrlLoading not getting called

前端 未结 4 1969
难免孤独
难免孤独 2021-01-02 15:30

I am making an ebook reader which uses epub format to load books into webviews. In some of the books there is an anchor link to some portions in the same chapter. Each chapt

4条回答
  •  醉酒成梦
    2021-01-02 16:07

    Yes. Mr. androgeek answered it rightly. From Android OS 4.4(KK), if you implement callbacks such as shouldOverrideUrlLoading() or shouldInterceptRequest(), then WebView invokes them only for valid URLs. If you are using Custom URL and under your control then you need to follow RFC 3986 standard to above methods called. Kindly check RFC 3986 related file:// and correct your URL

提交回复
热议问题