https://kotlinlang.org logo
#room
Title
# room
f

fuad

06/25/2022, 12:39 AM
Room / Modules / architecture question... Typically with initializing Room you need a reference to Application Context. If you're building a library / SDK that needs to write to a Room database, what's the proper way to handle Room? Does the library own it's own Room instance? Do you want to create a singleton within your library to then reference Room from the library and to provide a handle to code using the library to read from the database? I found such suggestions in this SO post : https://stackoverflow.com/questions/62190220/room-database-setup-in-android-library-module but not really sure if this is actually the best or even a recommended approach.
s

ste

06/25/2022, 10:01 AM
f

fuad

06/27/2022, 3:17 PM
very interesting, thanks!
13 Views