lundi 11 janvier 2016

localStorage Uint8Array in limted HTML5 browser (Android)

So I'm trying to make an android app using PhaserJS and compiling it using CocoonJS (Cordova) as a Canvas+ application. Along with this, I am using sql.js to work with local data. The problem I am having is when making the SQLite 3 data persistent. The limited HTML5 environment only allows localStorage in the form of a UTF-8 string.

The advised way to store the SQLite3 database is by converting it to Uint8Array and storing it using localStorage. This works completely fine on a browser such as chrome, but not in my HTML5 app.

Converting the data toString does not work and neither does JSON.stringify.

Any help would be appreciated. :)

Thanks,

-Kapila

Aucun commentaire:

Enregistrer un commentaire