Dimitri
Dimitri

Reputation: 302

How can I store more than 5MB data on a Phonegap HTML5 offline application?

I am working on an HTML5 application. This app must store data (lots of JSON & Base64 pictures) until the user synchronises it with our server. I must keep data stored on the device for a month after a sync.

I will use Phonegap for building the app. I know there is a limit of 5MB, so I'll certainly have to store my data in a different way. What are the best solutions? What would you recommend me?

Edit:

I forgot to say, but I will have physically all the devices used by my company for installing the application, so maybe there is a way to overpass the restriction by tricking the Android pad?

Upvotes: 0

Views: 5912

Answers (2)

Benjamin Oman
Benjamin Oman

Reputation: 1654

There's a neat SQLite plugin here I'm using in an iOS/Android Phonegap application. I've tested it and found it's methods to work well on both platforms.

As for syncing JSON data and Base64 images, I'm doing this same thing with a SQLite DB managed through this plugin. I only have a couple hundred smaller images I'm working with but I've found the SQLite DB to be pretty reliable for this purpose.

Thanks to the authors of that plugin.

Upvotes: 2

davids
davids

Reputation: 6371

That stands for localStorage and the built in SQLite database. I would suggest you taking a look at the File API, which would allow you to store files in the device.

Upvotes: 3

Related Questions