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.

Need Your Help

openFileOutput throws exception

java android file-io android-emulator

I am writing data to xml files in my android app. I looked up how to properly do file IO and found that I need to use openFileOutput. As far as I can tell there is nothing wrong with my code but it...

Where does log stash saves my data?

logging elasticsearch logstash kibana

I am wondering where log-stash saves my data, I want to delete all the existing data because I made a mistake when I am uploading, I tried to delete all the indices and cleared the cache but my dat...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.