I saw DatabaseErrorHandler interface that have onCorruption method , this interface can be passed to the SQLiteOpenHelper constructor . my question is what is a good implementation to provide in this method ? should i handle the delete side-effect problems only ?? or what causes this method to be called
I saw DatabaseErrorHandler interface that have onCorruption method , this interface can be passed
Share
If there is nothing special you want to do when the database gets corrupted then pass in
null. The DefaultDatabaseErrorHandler will be used then. It deletes the database since corruption can’t be repaired in SQLite afaik. Luckily it should never happen – SQLite is pretty robust.