Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phonegap localstorage saves after power off?

Does data saved via localstorage in phonegap remains retained even after the app/phone is turn off and restarted? If not, should I be using sqlite instead?

like image 879
mugetsu Avatar asked Jan 03 '12 02:01

mugetsu


1 Answers

Yes, but you are actually using HTML5 web storage (great write-up here) to store the persistent data, not phonegap.

I wrote a tutorial on using local storage (on PhoneGap / Android). If you're not interested in the full tutorial, search the page for "localStorage" and "JSON" (for parse() and stringify()) for examples of their use.

like image 10
Libby Avatar answered Nov 11 '22 18:11

Libby