How do I check/set Android webview settings

How would I set the following in Ionic (version 3) Android build:

settings.setAllowFileAccessFromFileURLs(true);
settings.setAllowUniversalAccessFromFileURLs(true);

Any help pointing me in the right direction would be highly appreciated.

If this is possible, it would be a configuration in the config.xml for Cordova.

Thanks for the reply Sujan

After a few hours looking into this I have just found out that the Ionic page on App Preferences is the thing to use - was able to fetch both settings and confirm they were set to true.

1 Like

Can you please provide the config.xml code that you have written for the same?
@Sujan12 same question to you too please.

Do we need to use this plugin : “https://ionicframework.com/docs/native/app-preferences/” ?

Sorry ng22792 It been so long ago I have completely forgotten what and why I needed it.
I did a search in my old Ionic files for the plugin but nothing came up. That would suggest that for whatever reason I stopped using that section of code and did everything the IONIC way.

perhaps you could say what the problem is.

Can you tell me what “IONIC” way did you use to manipulate the
settings.setAllowFileAccessFromFileURLs(true);
settings.setAllowUniversalAccessFromFileURLs(true);
tags?

Sorry I just can’t remember why I needed it - I think in the end I just put all the files in the assets folder.

The following might help:

1 Like