cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shazron <>
Subject Re: Changing config.xml settings at runtime
Date Mon, 11 Feb 2013 16:59:34 GMT
The only case (as Brian mentions) is not allowing the whitelist to be set
at runtime.
Also - does the app have to "reset" if a setting that was read at runtime
was changed? ie we probably need a "configchanged" event/notification or
something. For example, BackupWebStorage in iOS, etc.

On Sun, Feb 10, 2013 at 11:01 AM, Andrew Grieve <>wrote:

> First - I'd like to add yet another setting for iOS:
> KeyboardShrinksView (boolean).
> It applies to apps that position their elements relative to the bottom of
> the webview. When the keyboard comes up, I'd like to shrink the webview
> rather than shrink the viewport and have the page scrollable. This is the
> default behaviour on Android, and makes a lot of sense when building apps
> as opposed to webpages.
> But... Reason for this email, is I think it'd be useful to have a
> x-platform API for changing the settings within config.xml at runtime.
> Something like:
> cordova.setConfigValue(key, value)
> An example of the keyboard case:
> app.onPageChange = function(pageName) {
>   cordova.setConfigValue('KeyboardShrinksView', pageName != 'help');
> };
> And I suppose adding a getter makes sense:
> cordova.getConfigValues(successCallback)
> I'm thinking that setting these at runtime will *not* persist across app
> restarts to avoid the issue of what should happen when devs push updates to
> their apps that change settings around.
> If everyone's okay with this, I'll file a bug & sub-bugs per-platform.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message