I use the Room Persistence Library for my Android app, but after it's creation I can not find .sql file with tables on my device.
When I create database through SQLiteOpenHelper
I can see all my tables in folder data on the device, but when I create database through Room there is no file anywhere.
Where can I see the content of all my tables?
Create database code:
@Provides
@Singleton
PokuponDataBase providePokuponDataBase() {
return Room.inMemoryDatabaseBuilder(SuperDealApp.getInstance().getApplicationContext(), PokuponDataBase.class, "PokuponRoomDatabase").build();
}
Go to Tools -> DDMS or click the Device File Explorer below Layout Preview in right bar. Device Monitor window will open. In File Explorer tab, click data -> data -> your project name -> databases . Click pull a file from device icon.
Go To App Inspection . Then select the process. Database Inspector will now show the database contents. in 2021, with current Android Studio, this should be the only accepted answer.
database. Contains classes to explore data returned through a content provider. If you need to manage data in a private database, use the android.
I found the cause of disappearing my database. It was because I create it incorrectly. I use Room.InMemoryDatabaseBuilder() instead of simple Room.databaseBuilder() and after each application reloading my db was recreated and also inMemory database does not create any files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With