I am using a Listener Service to insert some data from the phone to the watch into a room database. ...
n
I am using a Listener Service to insert some data from the phone to the watch into a room database. Is it possible for my watch app's UI to update itself without having to reload it once new data is inserted? Or would I need to use a broadcastReceiver to notify the UI that it needs to recompose?
a
Shouldn't need a broadcast receiver. Your UI can be driven by a state changes which are backed by observing changes to the Room database.
Room supports coroutines, rxjava and livedata I think - here's an overview of the principles https://developer.android.com/codelabs/android-room-with-a-view-kotlin#0
n
Thanks! Will check this out!
a
Step 7 is where it starts to talk about observing changes