Crosswalk cannot access Localstorage


#1

Hello everyone,
I am using Crosswalk in my ionic app to boost performance on Android devices. The problem I have is that Crosswalk does not seem to be able to read values I set in localStorage. When I removed crosswalk and tried the app again, I was able to read the values.

I ‘googled’ and found this link: https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview. It says that one of the drawbacks of Crosswalk is that “Crosswalk WebView stores data (IndexedDB, LocalStorage, etc) separately from System WebView”. It suggests that “you’ll need to manually migrate local data when switching between the two”. How would I be able to migrate the data to Crosswalk so I can access it?

I am using Crosswalk version 12.41.296.5 by the way! Thanks guys!


#2

If you want to switch between the two (Crosswalk and System webview) you can use SQLite ( http://ngcordova.com/docs/plugins/sqlite/ ). That way applications will use the same database to lookup data.
In order to migrate existing data (manually), you would have to do similar: create one application with System WebView that will read all the data from localStorage and copy it to SQLite database. Than, build another with Crosswalk or System Webview that will use SQLite.