Questions tagged [getwritabledatabase]

getWritableDatabase is one of the methods of the Android's SQLiteOpenHelper class which returns a reference to a SQLiteDatabase.

The getWritableDatabase is a method of the SQLiteOpenHelper class, from the Android platform, used to retrieve a reference to a SQLiteDatabase in which the user can insert data. Calling this method will either open an already created database or will trigger the creation of the database if one doesn't exist. Executing this method may take a long time so it's recommended to not call it on the main UI thread.

32 questions
-2
votes
1 answer

this.getWritableDatabase() is not calling onCreate()

I know similar questions have been asked many a time before; but after scrubbing through posts for hours, I haven't been able to find a solution. My implementation of SQLite refuses to work correctly, and the database is not being created, even…
Nikhil
  • 1
  • 2
-3
votes
1 answer

android getWritableDatabase() crashes

so I saw a lot of answers about this topic but neither worked or I didn't really understood what to do ! xD so if you answer by linking a topic that answers that fine ! I have a MainActivity where I display my stuff and all, and a class…
Yorokobii
  • 17
  • 6
1 2
3