views:

28

answers:

1

I have prebuild database of mostly string objects. I want to know how to put in my apk file so the database will be already created when the user installs the database.

+2  A: 

I found a good example of this: Using your own SQLite database in Android applications

Basically, you export the created database as an sql-file and store it in the assets-folder. On the first program start, you import the data of the file into your final database.

I think it's the best approach, however your data will be there twice in the apk and the db, using some more storage space.

walla
nice article, was helpful
schwiz