Hi Roei, > From: Crosswalk-help > [mailto:[email protected]] On Behalf Of Roei > Tov > Sent: Tuesday, October 28, 2014 07:16
> We have deployed our web application to Google Play store using Cordova as > the native wrapper and Crosswalk 8 for the web engine runtime (targeting > Android 4.0+ devices) . Glad to know this. If possible, I would like to try your app. > We are using localStorage API to store some specific(important) information > for the user of the device. Does the data that is stored in the localStorage > is kept after user updates to a newer version (we don't care for the case of > uninstall and then re-install)? I tried to create a test case to reproduce this issue, but unfortunately I cannot reproduce it. - Firstly create a web page using localStorage at http://zqzhang.github.io/experiment/localstorage/, which can display a count of how many times the user has loaded the page. - Then create an app with Crosswalk 8 on Android to access this web page multiple times; which can check that localStorage API is able to use as a persistent storage. And YES, the localStorage API is absolutely to be used as a persistent storage per my testing. - Then increase the app version (still with Crosswalk 8 embedded) and upgrade the app on Android device (here using ‘adb install -r’ to simulate app update from Google play); which is used to check if localStorage is able to access the page’s local storage area. The answer is also YES. - Rebuild the app with Crosswalk 9 on Android, and upgrade the app on Android devices, to see if the data in local storage is lost or not. The answer is YES; the data that is stored in the localStorage is still there. > If it is kept, do you know about any other scenarios that the data may lost > (e.g. upgrading to Crosswalk 9)? Per the simple testing above, upgrading to Crosswalk-9 won't make your app lose the data. Per http://dev.w3.org/html5/webstorage/#disk-space, user agent should limit the total amount of space allowed for storage areas. The data may lost if it stores more the limited amount space. I don't know exactly the amount of the limited space. But per https://arty.name/localstorage.html, Crosswalk 8 gets "5200000 characters were stored successfully, but 5300000 weren't." You can check whether this is enough for your app. Another scenario that the data may lost is that your app user intentionally or un-intentionally clear the data :). I tried the test above by intentionally clearing the data via system setting, the data is lost. > If data lost after update, what other alternative reliable storage that > endures after updates you recommend? No need this, I think. Thanks, Zhiqiang _______________________________________________ Crosswalk-help mailing list [email protected] https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
