Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2F53610199 for ; Tue, 23 Apr 2013 16:39:16 +0000 (UTC) Received: (qmail 64169 invoked by uid 500); 23 Apr 2013 16:39:15 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 64148 invoked by uid 500); 23 Apr 2013 16:39:15 -0000 Mailing-List: contact issues-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 issues@cordova.apache.org Received: (qmail 64138 invoked by uid 99); 23 Apr 2013 16:39:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Apr 2013 16:39:15 +0000 Date: Tue, 23 Apr 2013 16:39:15 +0000 (UTC) From: "Davide Maestroni (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-3064) The preferences are read only the very first time the application runs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-3064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13639208#comment-13639208 ] Davide Maestroni commented on CB-3064: -------------------------------------- I forgot to mention one important detail which may be involved in the root cause of the issue: in my case I am overriding the back button and calling, on the "backbutton" event, the following Javascript code: {noformat} window.addEventListener("backbutton", function() { navigator.app.exitApp(); }); {noformat} The application looks to successfully exit (it does not stay in background, still the Android OS is keeping the main thread alive for performance boost...), but when I restart it all the settings are lost. I am still facing the issue today, and if you are not going to fix it I will need to keep and maintain my own workaround. > The preferences are read only the very first time the application runs > ----------------------------------------------------------------------- > > Key: CB-3064 > URL: https://issues.apache.org/jira/browse/CB-3064 > Project: Apache Cordova > Issue Type: Bug > Components: Android > Affects Versions: 2.5.0, 2.6.0 > Environment: All Android versions and devices > Reporter: Davide Maestroni > Assignee: Joe Bowser > > The preferences in the config.xml file are not read again if application exits and then restarts. > A simple test is to set the background color to GREEN (-16711936 or [0xff00ff00]) and use an html page with transparent background. > The first time it is run, the application correctly displays a green background but then, after exiting by pressing the back or home button, and re-running it, the background stays black. > Forcing the application thread to stop from the Android settings menu seems to cause the preferences file to be read again. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira