cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Murphy (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CB-3063) localStorage not persistent on Android
Date Sun, 28 Apr 2013 12:16:16 GMT

    [ https://issues.apache.org/jira/browse/CB-3063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13643982#comment-13643982
] 

Philip Murphy edited comment on CB-3063 at 4/28/13 12:16 PM:
-------------------------------------------------------------

I've created a simple test case that demonstrates the issue - assumes libs/cordova-2.7.0.js
is in libs folder under index.html. Note, that I've removed the dependency on any other libraries
I was using including Sencha Touch.

It is like there are multiple instances of localStorage existing for the same app. After entering
in text save it to localStorage, then close the app and remove it from recent apps. Re-start
the app, now enter a new string and save it. Close app and remove it from recent app list.
Now start the following steps: start app, display local storage (by pressing cancel button
on prompt dialog), take note of string displayed, close app, remove from recent app list,
and repeat. Each time the string that is returned may be different, sometimes the first one
is displayed, sometime the second one, and sometimes null. Totally crazy inconsistency - appears
that Android memory management is doing some weirdness here.
                
      was (Author: philipjmurphy):
    I've created a simple test case that demonstrates the issue - assumes libs/cordova-2.7.0.js
is in libs folder under index.html. Note, that I've removed the dependency on any other libraries
I was using including Sencha Touch.

It is like there are multiple instances of localStorage existing for the same app. After entering
in text save it to localStorage. Then close the app and remove it from recent apps. Re-start
the app, now enter a new string and save it. Close app and remove it from recent app list.
Now start the following steps: start app, display local storage (by pressing cancel button
on prompt dialog), take note of string displayed, close app, remove from recent app list,
and repeat. Each time the string that is returned may be different, sometimes the first one
is displayed, sometime the second one, and sometimes null. Totally crazy inconsistency - appears
that Android memory management is doing some weirdness here.
                  
> localStorage not persistent on Android
> --------------------------------------
>
>                 Key: CB-3063
>                 URL: https://issues.apache.org/jira/browse/CB-3063
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.6.0
>         Environment: App running Jquery 2.0 beta, Jquery Mobile 1.3, RequireJS, UnderscoreJS,
BackboneJS and Phonegap/Cordova 2.6.0. Samsung Galaxy S3 JellyBean (4.1.2)
>            Reporter: Sindre Haaland
>            Assignee: Joe Bowser
>            Priority: Critical
>              Labels: android, localStorage
>         Attachments: index.html
>
>
> After upgrading from Phonegap 2.5.0 to Phonegap 2.6.0 localStorage stopped working. setting
and getting items from localStorage works when the app is in memory. One can go to the home
screen and start the application again, but when it is completely closed the data from localStorage
is lost. 

--
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

Mime
View raw message