chrome-mobile-apps Need to access localStorage

641 views
Skip to first unread message

Shane Gadsby

unread,
Sep 5, 2014, 11:35:58 PM9/5/14
to chromi...@chromium.org
Hi all, I'm upgrading an app I've already published to the Play store. My problem is that I previously saved player progress in localStorage, but now cannot access it (as per chrome-mobile-app restrictions)  is there a way for me to get access, even if its just read access, to the localStorage again so players don't lose their progress when they upgrade?

(in the new version I'm using chrome.storage.local, I just need a way to migrate the existing localStorage data over to it)


Thanks all!

Bin Wang

unread,
Sep 6, 2014, 12:32:28 AM9/6/14
to chromi...@chromium.org
Play store? do you mean android app powered by Mobile Chrome App?

Michal Mocny

unread,
Sep 7, 2014, 7:55:03 PM9/7/14
to Bin Wang, Chromium Apps
Shane, we should not be blocking localStorage on mobile at this point (though we will likely block it in the future).

However, if you shipped an app already, it probably used the default system webview.  If you have upgrade to a recent cca version, we now use the crosswalk webview.  That would mean that the localStorage backing changed, and would explain why upgrading seems to cause a "data wipe".

If this is what is going on, I would propose shipping an update that continues to use the old webview (you can disable crosswalk by adding "webview": "system" to manifest.mobile.json).  Then, migrate data from localstorage to chrome.storage.local on startup.  Once your users have transitioned storage, you can consider swapping to crosswalk webview.

Let me know if my guess is wrong, and we will help figure this out!
-Michal

--
You received this message because you are subscribed to the Google Groups "Chromium Apps" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-app...@chromium.org.
To post to this group, send email to chromi...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-apps/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Reply all
Reply to author
Forward
0 new messages