I am trying to create a local database on an android phone using sqlite.
I have a helper class, shown below, that is used to create the database and pro
oncreate() method is not a constructor and also Called when the database is created for the first time.So you have to call getWritableDatabase() or getReadableDatabase() for open or create to your database.
getReadableDatabase() :- Create and/or open a database.
getWritableDatabase() :- Create and/or open a database that will be used for reading and writing.