8

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();
}
WorieN
  • 1,276
  • 1
  • 11
  • 30
  • Try `getDatabasePath()` as [suggested here](https://stackoverflow.com/questions/44263891/how-to-use-room-persistence-library-with-pre-populated-database#comment75538553_44263891). – Sufian Jul 05 '17 at 12:49

1 Answers1

8

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.

WorieN
  • 1,276
  • 1
  • 11
  • 30