1

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.

Sai Sarath C P
  • 1,454
  • 2
  • 9
  • 26
  • Timers are handled differently, depending where they are located. You mentioned UI, so here's a major question ... Is this for javascript (also GWT) or just java? Is this timer to run on the server or UI? From your comments, I'm assuming it be in the UI. – Dakoda Apr 19 '17 at 14:52
  • Hi Dakoda, all my timers are in the App which updates the ui. No server side interaction is there . I am using local db for storage – Sai Sarath C P Apr 19 '17 at 15:29
  • You didn't answer ... Are your timers in java or javascript? – Dakoda Apr 27 '17 at 15:14
  • I develop application for android and i keep all my timers in Java – Sai Sarath C P Apr 28 '17 at 11:31
  • this code will show the timer in a java thread. http://stackoverflow.com/questions/11707066/timer-in-java-thread The reason for the questions: javascript doesn't have true threading. it tries but poorly simulates it. Good luck. – Dakoda May 02 '17 at 14:45

0 Answers0