I'm trying to close and then reopen Room database. (The purpose is to backup SQLite file)
This is how I close it:
public static void destroyInstance() {
if (INSTANCE != null && INSTANCE.isOpen()) {
INSTANCE.close();
}
INSTANCE = null;
}
INSTANCE is a RoomDatabase object
And to reopen I'm initializing INSTANCE object again by calling:
Room.databaseBuilder(context.getApplicationContext(), AppDatabase.class, C.ROOM_DB_NAME)
After I move to another activity, I'm seeing this error in logcat: E/ROOM: Invalidation tracker is initialized twice
SELECT queries work fine, but INSERT fails with the following errors:
E/SQLiteLog: (1) no such table: room_table_modification_log
E/ROOM: Cannot run invalidation tracker. Is the db closed?
java.lang.IllegalStateException: The database '/data/user/0/ro.example.example/databases/mi_room.db' is not open.
Although INSTANCE.isOpen() returns true
Room version: 1.1.1
Does anyone know what is with this "room_table_modification_log" table?