My program needs to continuously get data from the backend and keeop the state, so my data is maintained in Service.
When the Activity needs to display, my ViewModel will collect the state from the Service, which will create a dependency on Service, is this appropriate? Is there any recommended way to collect the data maintained in Service from ViewModel.
Because I have noticed various tutorials that are getting data directly from the network or other sources in the ViewModel. So I don't understand what will be the problem in collecting data from Service directly in ViewModel.