Reputation: 377
I am creating (in android studio) an app which has a couple basic tables. One will be a bunch of exercises (pull ups, push ups ect) and I would like to put a ton of common ones into the table by default.
Where in my code would be the logical place to do that? I have made a databaseHelper class which extends SQLiteOpenHelper. Just not sure if I should..
Upvotes: 0
Views: 40
Reputation: 1006614
Create a database with your desired data, package it as an asset, and use SQLiteAssetHelper
to automatically unpack it into the proper spot for you when you first try to work with the database. This will be faster than running your own transaction(s) to insert the data.
Upvotes: 1