1

I am creating developing one .apk application using phonegap. Shall i create local database in android mobile.

Because some one told me that you have to create online database, if you are creating .apk file using phonegap. Phonegap will not allow to create database for locally for android phone.

As per example..

I am creating my personal dairy application on phonegap for android mobile. I have create database of dairy on server online. I can not create database locally in android phone.

I request yo guide me for my this query.

Thanks, - Rushabh Gandhi

4

1 回答 1

3

No need phone gap itself gives you the functionality to add data into data base into the device only.

Read the official docs there are two modes of storage in phonegap

  1. Local Storage
  2. Database

including database option

check out this link http://docs.phonegap.com/en/2.6.0/cordova_storage_storage.md.html#Storage for learning How to use database in android using phonegap

and If you want to write native codes

Then you can create your own plugins

Take a look at this simple plugin like this one https://github.com/brodyspark/PhoneGap-SQLitePlugin-Android

If you want tutorials on how write plugins in phonegap for android then read this official tutorial. http://docs.phonegap.com/en/2.6.0/guide_plugin-development_android_index.md.html#Developing%20a%20Plugin%20on%20Android

于 2013-04-10T13:05:02.423 回答