开发者

How to overcome Android WebView file size limit when loading a file

开发者 https://www.devze.com 2023-01-06 14:59 出处:网络
It seems there is a size limit when opening up pages using Android\'s WebView object.I am opening an HTML file in the \'Assets\' folder.I have used the method myWebView.loadUrl(\"file://android_assets

It seems there is a size limit when opening up pages using Android's WebView object. I am opening an HTML file in the 'Assets' folder. I have used the method myWebView.loadUrl("file://android_assets/index.html").

It works fine for a test html page but the real HTML I need page calls a JavaScript file that is over 1MB (dont ask why so big). I get an error stating that the .js page cannot be loaded.

I have heard that I coul开发者_如何学运维d use the openContentURI() method, but the main page i am opening up is not the problem. The problem lies with a subsequent included JavaScript file.

Any idea how I can get this to work ?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号