Getting LiveData updates in multiple processes

Viewed 1486

In my Android application I use the Room API to persist data that comes from the network. The app is split into several processes, with one of them responsible for syncing the data (implementing SyncAdapter). The UI is running on a different process, with it's own DAO to access the DB. My issue is that the LiveData I query on the UI process, doesn't get any updates when the SyncAdapter writes new data to the DB. Because the DB is shared between processes, I expected the OnChanged to be called on all processes that have LiveData that reflects the DB, meaning that all processes can observe data base changes

2 Answers

enableMultiInstanceInvalidation introduced in room 2.1.0 may help you official docs

Related