Why onCreate() of RoomDatabase.Callback() is not called?

Photo by Tim Gouw on Unsplash

Room Persistence library is a part of android’s Jetpack components. It provides an abstraction layer over SQLite, which is also known as ORM(Object-relational Mapping). RoomDB has substantially increased developer productivity by removing tons of boilerplate code and need to manage SQLite directly. RoomDatabase.Callback() One of the many features Room provides is the callbacks fun onCreate() and fun onOpen(). These methods come in handy when we want to pre-populate the database. As simple as it might sound, it got tricky for

Continue Reading

Site Footer

Sliding Sidebar