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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With