android webview javascript does not load sometimes -


i loading html data webview using loaddatawithbaseurl() method. html includes js file absolute path (file:///android_asset/myjs.js). if set base url "file:///android_asset/" or "fake://not_needed" in loaddatawithbaseurl method, javascript not loads. works of time , can see rendered html in webview. fails execute javascript included in html. have viewpager webview in each page. webviews being loaded @ same time.

try :

webview.getsettings().setjavascriptenabled(true); 

and before making call loadurl :

webview.clearcache(true); webview.clearhistory(); 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -