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

Joan Colmenero

08/20/2020, 1:30 PM
Anyone of you guys have used Pre-packaged room before? I'm using this new API method
createFromAsset(file path of db)
but looks like is not updating the db when inserting or deleting, whell for the first time it does populate everything that I have, then when I update the data and check the DB Browser for SQLite is not being reflected and when I close the app and open it again it keeps the same data as the start. Any idea?
r

Roar Gronmo

09/03/2020, 8:05 PM
Have never used it, but AFAIK the prepackage is a copy source, and therefore you should run it "only once" to prepopulate the room DB. Florina Muntenescu have an article here: https://medium.com/androiddevelopers/packing-the-room-pre-populate-your-database-with-this-one-method-333ae190e680
2 Views