Questions tagged [countdowntimer]

The Android `CountDownTimer` class. Do not use this tag for any countdown timer-related question that is not related to the Android class

The Android CountDownTimer class. This class allows scheduling a task in Android. The task can be one-shot-executed or executed in defined time intervals.

Do not use this tag for any countdown timer-related question that is not related to the Android class

1581 questions
-1
votes
1 answer

Countdown timer wont display onTick

I'm having an issue where my code won't display the onTick method, and each time the counter is run, it simply displays the text "Done", as it should when it's finished. It seems that the endTime variable isn't being passed to the timer class? Any…
RHPR
  • 1
  • 1
-1
votes
1 answer

countdown with editText

I would like to create a countdown where the initial number is given by the user. I created this application but when the application starts shut down. I do not understand what the mistake is because there are no errors during the compilation. What…
-1
votes
2 answers

solution to countdown restarting after refreshing

please kindly help me with my countdown code its restarting everything I refresh the page. Also, the minutes and seconds are counting together at the same time Below is my current javascript code; function startTimer(duration, display) { var…
-1
votes
1 answer

Creating a Coutdown Timer from a value in a Databse

I would like to pull a value from a database and use this in a countdown timer. It seems that its not possible to do with CountDownTimer but looks like it might be achievable with a Handler. Can anyone provide an example? I'm using Android…
Matmajot
  • 19
  • 7
-1
votes
1 answer

Score not updating in Countdown Timer repeat

In this game, the user scores a point for every time they input an integer equal to a random number generated (variable called 'LoadG1'). If their input == loadG1, they get a point added to the 'score' variable. The idea is it should increase by one…
User44
  • 132
  • 8
-1
votes
2 answers

How to record audio file using timer

Hi i am new for android and in my app i have to record audio using timer as like my below image, Using my below i can able record audio but how can do this scenario with help of timer please help me some My code:- @Override public void…
AbhiRam
  • 1,833
  • 5
  • 34
  • 74
-1
votes
1 answer

Having trouble with CountDownTimer for whackamole game

I'm trying to do a whackamole type game. I have enabled ImageViews hole1 >hole 9. Calling swapFace() swaps the ImageView for a random period as I want to happen. I want to start by calling start() which will, on onTick, call newPopup(). After a…
Heinz
  • 75
  • 8
-1
votes
2 answers

how to cancel method of count down timer to stop working

I have list of music that user set time to play. I want to have a button to cancel m count down timer . I test some way but it doesn't work at all. here is my code to play and set time to play. public class Main extends Activity { public static int…
nsr
  • 95
  • 10
-1
votes
1 answer

Reset javascript timeout with trigget click

I am working on Question / Answer game and i need to set a countdown for each question. If time is out, call next button click. Here is my code, demo: https://jsfiddle.net/0ex9neh3/1/ How can I reset a timer on trigger click? Here is a html…
Foxsk8
  • 298
  • 1
  • 8
  • 21
-1
votes
2 answers

Want button to be visible after being invisible

I have a problem with a button to be invisible when I want. In my if statement I have declared the exerciseButtonDone to first to be invisible but then after the final countdown I want it to become visible. As my code is right now the button is…
-1
votes
1 answer

Countdown timer FATAL EXCEPTION

So i'm trying to implement a timer in a custom view class which is a subclass that I call from an activity but its throwing me this error FATAL EXCEPTION: main java.lang.NullPointerException at…
Cesar Mtz
  • 322
  • 2
  • 13
-1
votes
1 answer

Timer has to remain deleted

CountDownTimer (2000, 0000) { @Override public void onTick(long millisUntilFinished) {} @Override public void onFinish() { txt1.setText("..."); txt1.setVisibility(View.VISIBLE); txt2.setText("..."); …
Werl_
  • 123
  • 3
  • 9
-1
votes
2 answers

Trying to use PHP variable in Javascript

I am trying to bring a php variable into my javascript code to use for a countdown timer. Because of the other functions happening based on the timestamp php variable, I need to to be in php as well.