I want to do countdown timer with pause and restart.Now i am displaying countdown timer By implenting ontick() and onfinish().please help me out.HEre is th code for countdow
I would add something to the onTick
handler to save the progress of the timer in your class (number of milliseconds left).
In the onPause()
method for the activity call cancel()
on the timer.
In the onResume()
method for the activity create a new timer with the saved number of milliseconds left.
Refer the below links
LINK
LINK