Den  Stre Den Stre - 2 years ago 466
Java Question

Android Studio Countdown Timer

So I am working with Android Studio and I need a countdown timer.
So far i have searched and found all kinds of code lines that do not work , or do not do exactly what I wanted the app to do.
I want the timer to countdown , if the user answers incorrectly , the time left will be reduced , and if the user answers 3 correct , then time will be added.
Can anyone give me a code and explain what it does , do I need anything extra?
and how i can modify it to my needs.

Answer Source

You can use the official countdown timer from Google. Look here:

new CountDownTimer(30000, 1000) {

    public void onTick(long millisUntilFinished) {
        mTextField.setText("seconds remaining: " + millisUntilFinished / 1000);

    public void onFinish() {

And then you can manually add/reduce your time with every wrong answer.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download