Android Count Down Timer

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Parameters

ParameterDetails
long millisInFutureThe total duration the timer will run for, a.k.a how far in the future you want the timer to end. In milliseconds.
long countDownIntervalThe interval at which you would like to receive timer updates. In milliseconds.
long millisUntilFinishedA parameter provided in onTick() that tells how long the CountDownTimer has remaining. In milliseconds

Remarks

CountDownTimer is a pretty lean class - it does one thing very well. Since you can only start/cancel a CountDownTimer, you have to implement pause/resume functionality as shown in the second example. For more complex functionality, or to specify a timer that should run indefinitely, use the Timer object.



Got any Android Question?