Storage in PhoneGap
I trying to use PhoneGap for developing a simple app that has some kind of DB with a couple of values and the data is retrieved from there and showed. The thing is, I a newbie in this. I know there is a plugin named storage but i just can't find anything that enlight me enough for doing this. Can anyone help me or tell me where can I get a good tutorial for this?
I would like to tell you about two storage mechanisms. First one is a SQL database. Second one is localStorage.
SQL organises your data in a good way, local storage may be your "cache", some kind of qiuck access memory. Both are very usefull. Both work on multiple platforms.
Here are some examples showing storing and accessing data in local storage:
window.localStorage.setItem("key", "value"); var value = window.localStorage.getItem("key");
I think you will easily find how to access database. I am sure you will find this interesting:
You can find Phonegap Development storage API.
It's very useful for beginners.