How to have a default database
If you want to include a database with initial data in your apk, you have to insert the database file into the projects assets folder, then programmatically check if the database, and if it does not exists copy the one from the assets.
You will need a function to check if the database exists, fox example:
If the check shows that the the database does not exist, a function like this will copy it:
-
// Open your local db as the input stream
-
// Path to the just created empty db