Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 76E7EDF9B for ; Mon, 11 Feb 2013 09:28:13 +0000 (UTC) Received: (qmail 4298 invoked by uid 500); 11 Feb 2013 09:28:13 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 4237 invoked by uid 500); 11 Feb 2013 09:28:12 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 4195 invoked by uid 99); 11 Feb 2013 09:28:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Feb 2013 09:28:11 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of brian.leroux@gmail.com designates 209.85.223.174 as permitted sender) Received: from [209.85.223.174] (HELO mail-ie0-f174.google.com) (209.85.223.174) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Feb 2013 09:28:04 +0000 Received: by mail-ie0-f174.google.com with SMTP id k10so7402785iea.33 for ; Mon, 11 Feb 2013 01:27:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=Is3NPlqKzqP/me+llLsQ4nt6FCrEa3wEV5Is75js8NA=; b=wPLj1xWj3ZGgDvR4euK69GCBtukRIPQ/1siH0IMHhPr56iKAJHsxcmBz6LEr8JpGHW ZSeMKDhGlAEaoXM1stPVUzWwkFkZJhtENxpQtFN1nUpcmIPXOjZRNjeari4tHQCmEt2J zn8VjymafvxGqmeEPDqMOewI6vIpSlz7IURY0uARfYAgQXyVqtl/TNTy9mKtFWPdMuvg kr8teYAh+J5DtmHAEWOP/VQgTdgo57q4kNhzSXgPYM8+fpRMNRClQS+ZRAD2oQpj5B7D BDkAAeX5a4hbGfC64CV7O+L69CWrtE+DpA774bG6tCK2uS7jVVKhK+F7nbHSNBnSqHoJ Kgbw== MIME-Version: 1.0 X-Received: by 10.50.219.129 with SMTP id po1mr11345307igc.35.1360574863870; Mon, 11 Feb 2013 01:27:43 -0800 (PST) Sender: brian.leroux@gmail.com Received: by 10.50.191.133 with HTTP; Mon, 11 Feb 2013 01:27:43 -0800 (PST) In-Reply-To: References: Date: Mon, 11 Feb 2013 09:27:43 +0000 X-Google-Sender-Auth: DXkiqXlek_O9X9QCWpWXdpF3swU Message-ID: Subject: Re: Changing config.xml settings at runtime From: Brian LeRoux To: dev@cordova.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hmm. Tricky: can an app modify the whitelist at runtime then? (Probably not a good idea.) On Sun, Feb 10, 2013 at 7:01 PM, 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.