I’ve written up a SqliteHandler class to create, update and handel all queries for the db my app will use. My question is now how to I actually make sure that in the onCreate() method of my MainActivity that I properly call SQLiteHandler and run the code to create/upgrade the db. I’ve used the @Override as recommended in the dev guide
I’ve written up a SqliteHandler class to create, update and handel all queries for
Share
According to the documentation of SQLiteOpenHelper:
You don’t need to worry about creating or updating yourself.
It will be done automatically when using your subclass of SQLiteOpenHelper.
The first time you call getWritableDatabase method, it will check if the database exists and create it if needed.