Android: chronometer as a persistent stopwatch. How to set starting time? What is Chronometer “Base”?
I do have one service running in the background. Whenever it starts I store in memory the starting time in milliseconds: startingTime = new Date().getTime(); I want to display a chronometer that starts counting when the service starts and never stops until the user presses a button. I want to allow the user to leave the activity rendering the chronometer, do some stuff and then return. But the idea is that when the user returns I dont want the chronometer to go to 0:00 again. Insted I want it to show the exact time that has passed ever since the service has started. I can calculate elapsedTime