fix(android): Allow loading local files

This commit is contained in:
Noel De Martin 2021-06-17 14:51:34 +02:00
parent 2fef3046fc
commit a9c83c4bc0

View File

@ -945,6 +945,13 @@ public class InAppBrowser extends CordovaPlugin {
settings.setBuiltInZoomControls(showZoomControls); settings.setBuiltInZoomControls(showZoomControls);
settings.setPluginState(android.webkit.WebSettings.PluginState.ON); settings.setPluginState(android.webkit.WebSettings.PluginState.ON);
if (preferences.getBoolean("AndroidInsecureFileModeEnabled", false)) {
LOG.d(LOG_TAG, "Enabled insecure file access");
settings.setAllowFileAccess(true);
settings.setAllowUniversalAccessFromFileURLs(true);
}
// Add postMessage interface // Add postMessage interface
class JsObject { class JsObject {
@JavascriptInterface @JavascriptInterface