The whole database shutdown during backup makes the otherwise excellent product half-usable: cannot run it automatically. However it's not necessary to stop the database for backup,. Just replace
roomDatabase!!.close()
with
roomDatabase!!.query(SimpleSQLiteQuery("pragma wal_checkpoint(full)")) in backup() method.
The whole database shutdown during backup makes the otherwise excellent product half-usable: cannot run it automatically. However it's not necessary to stop the database for backup,. Just replace
roomDatabase!!.close()
with
roomDatabase!!.query(SimpleSQLiteQuery("pragma wal_checkpoint(full)")) in backup() method.