Closed Ruggero1912 closed 2 years ago
In order to update the UI when new data arrives from the GATT clients:
A good mechanism for the notification could be a broadcast receiver (using LocalBroadcastManager) (but seems to be deprecated).
Otherwise consider this: https://developer.android.com/reference/androidx/lifecycle/LiveData
https://stackoverflow.com/questions/46207758/livedata-vs-handler-and-localbroadcast
In order to update the UI when new data arrives from the GATT clients:
A good mechanism for the notification could be a broadcast receiver (using LocalBroadcastManager) (but seems to be deprecated).
Otherwise consider this: https://developer.android.com/reference/androidx/lifecycle/LiveData