I started using Architecture components in my application, and I'm still learning how to use it.
In my application, I have an Activity showing different fragments in sequence. In some of them, I need to contact the background service to receive data from external BLE sensors. Since I need to interact with the service in more than one snippet, I wonder if the ViewModel is the right place to create the binding. I looked around , but I did not find the answer.
Are there any issues with service binding inside the ViewModel?
source
share