On a non-rooted android device, I can navigate to the data folder containing the database using the run-as
command with my package name. Most files types I am c
The database file is emtpy when using adb run-as
. This can be resolved by calling close() on the RoomDatabase instance. Call close() to let SQLite write its journal to disk.
I've created this button that closes the database connection on request:
via GIPHY
Here is how to call close on the RoomDatabase instance.