[ 
https://issues.apache.org/jira/browse/CB-3064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Davide Maestroni updated CB-3064:
---------------------------------

    Attachment: CB3064_logs.txt
                CB3064.zip
                CB3064.apk

I downloaded the Cordova 2.7.0 SDK and created a new project using the 
create.bat script.
I then slightly modified the main activity, the config.xml and the index.html 
file to reproduce the issue:
# started the application inside the emulator
# pressed the "Exit" button on the screen
# re-started the application through the emulator UI

The attached logs show how, the first time the application starts, the 
onCreate() function is successfully called (line 8) and the loadUrlTimeoutValue 
preference is correctly parsed.
Then, after the re-start, the onCreate() function is called again (line 51), 
but this time the preference value is not the one in the config.xml file.
I also attached the very same apk file I used to run the test along with the 
whole Android project.

As I wrote in a previous comment the issue look related to the persistency in 
memory of the Config singleton.
                
> 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
>         Attachments: CB3064.apk, CB3064_logs.txt, CB3064.zip
>
>
> 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

Reply via email to