Android - How to Create Sqlite database with Tables<>
This question already has an answer here:
I found the solution. DatabaseUtils' onCreate() is never called if i implement like below:
DatabaseUtils db = new DatabaseUtils(this);
in myActivity's onCreate() method. I need to call getWritableDatabase() in myActivity as below:
DatabaseUtils db = new DatabaseUtils(this); db.getWritableDatabase();
Then DatabaseUtils' onCreate() will be called and tables are created.