I\'m trying to backup a room database programmatically.
For that, I\'m simply copying the .sqlite file that contains the whole database
.sqlite
But, bef
First, the database must be closed to apply changes from the "dbName.db-wal" file.
"dbName.db-wal"
Then you can copy the database with all tables and last data changes
AppDatabase appDatabase = AppDatabase.getAppDatabase(getApplicationContext()); appDatabase.close();