views:

397

answers:

2

I already have a sqlite3 db file that I created in Windows, is there a way to package this file into my android application and access it as a sqlite db from within the application or do I have to create a db on application load or something in Android only? The db has about a 1000 records, writing sql scripts again might be monotonous and cumbersome

+2  A: 

Package it as an asset or raw resource. Copy it out from there onto the appropriate spot on the device. Downside: You will take up 1.5x to 2x the space on the flash (for the possibly-compressed copy stored in the APK plus the actual to-be-used copy).

Or, download the database from a server on first run.

CommonsWare
+2  A: 

Got this link, seems to serve my purpose

Ram