In the past, I changed the usual Webview property to Android. For instance:
wv.getSettings().setAllowUniversalAccessFromFileURLs(true);
where wv is the webview variable. Now I have a phonegap/cordova , and I want to change in the same line of code, I'm trying to do the following:
super.appView.getSettings().setAllowUniversalAccessFromFileURLs(true);
and:
super.appView.getSettings().setAllowUniversalAccessFromFileURLs(true);
I don't get compilation of errors, but when I add this line of code to the onCreate method, the application just closes. I try to add a line to the onCreate method in different places, for example, before and after super.onCreate and before and after loading html ( super.loadUrl("file:///android_asset/www/index.html") , but the application always closes Does any of you know if you can change this property to telephone / cordova?
source share