I have a list view in which each item is having a circular progress bar and all the data from the list view is fetching from a db.
I have a time realted task attached to each circular progress bar and have to update it regularly in the UI & clicking on each list view item will redirect me to a new activity where i have the bigger version of circular progress bar which updates .
I want the timer to run even my app is not in the foreground I want the progress of my timer at a time. Big question is how i can update the entire list view at a time and update the ui to refresh and show the all the progress bar loading dynamically.
Solutions i have tried: I used CountDown timer if the activity is changed the timer stops and everthing resets. I need something to run in background. I thought of services but i dont know if i started multiple services how can i track each and start and stop each service based on user timer start,pause/resume,stop request.
Any help is appreciated. Thanks in advance.