I am working on an Android app, and from time-to-time I need to wipe the SQLite database to start from a clean slate. After some googleing, I found:
context.deleteDatabase(DATABASE_NAME);
However, whenever I execute this statement, then [attempt] re-create my database, my app always starts up empty, with no data. The rest of the UI is there, it's just there is no data. To create the databse, I am using the standard
DatabaseHelper myDBHelper = new DatabaseHelper(this);
which extends SQLiteOpenHelper, that I have seen so many times here on StackOverflow.
As an FYI, when I do not execute the deleteDatabase() statement, all my data loads perfectly, so I know my DatabaseHelper class is working properly.
Also, the reason I am trying to clear the DB is because whenever I build my application in Android Studio, it always adds to the database instead of deleting it, then inserting fresh.