Android SQLite - why is my db re-created each time?
问题 I'm trying to get a better understanding of the SQLiteOpenHelper class and how and when onCreate and onUpgrade are called. My problem is that each time I quit and start my application (technically it's actually each time I create a new instance of MyDB), onCreate is called, and all of the data from the previous usage is effectively wiped... WTF??? I got around this problem initially by creating a singleton MyDBFactory where I created a single instance of MyDB. This allowed the data to be