1

I'm trying to include a SQLite database with a phonegap native application, I've seen a couple of methods that would work. However from looking at this recent post, it seems that these will pose a problem when submitting apps.

The guy who posted this and others have suggested the Phonegap SQLite plugin will allow me to include a pre-populated SQLite DB with my app.

Can anyone please confirm this and point out how exactly I achieve the pre-populated database? It doesn't seem to work with phonegap 1.2.

If it does allow me to create a pre-populated DB I'll switch to an earlier phonegap.

Community
  • 1
  • 1
mao
  • 1,059
  • 2
  • 23
  • 43
  • I tried getting the plugin to work with phonegap 1.2 by following instructions to fix the barcode reader plugin, no luck. – mao Dec 12 '11 at 04:20

1 Answers1

0

Why not use a standard SQLite DB ?

As for the prepopulated part, you need only add a check mechanism that finds out if the user is opening the app for the first time. If they are, you can load some INSERT SQLite queries into your DB and populate it. If the app is opened the second time, this does not happen.

To find out exactly what options you have at your fingertips, try this post below, I think it answers all your questions.

Phonegap Offline Database

Community
  • 1
  • 1
SashaZd
  • 3,315
  • 1
  • 26
  • 48