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.
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.
2.1m questions
2.1m answers
60 comments
57.0k users