I am injecting a javascript file to the WebView and that javascript file needs to load more files from the app assets folder. i used to load the files from remote server, but now i need to load them locally. I am getting "not allowed to load local resource". is this even possible? i can't find any solution here or using google. example:
...
webView.loadUrl("javascript:(function() {" +
"var parent = document.getElementsByTagName('head').item(0);" +
"var script = document.createElement('script');" +
"script.type = 'text/javascript';" +
"script.innerHTML = window.atob('" + encoded + "');" +
"parent.appendChild(script)" +
"})()");
this injects a "script.js" file into the webview. inside the script.js file i want to inject css background image that is located inside the app assets folder. when im trying to access "file:///android_asset" i get the "not allowed to load local resource" error.
