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

1696 questions
0
votes
4 answers

How to make timer that can run on background also?

I am working on rails and written javascript code for displaying timer that starts from 00:00:00. [NOTE: i have two button start and stop for starting the timer and stopping the timer] function timer(){ var sec, min, hour; sec=0; …
przbadu
  • 5,769
  • 5
  • 42
  • 67
0
votes
0 answers

Countdown timer doesn't start with new value set for time

I use time countdown timer in 00:00 format with this code: int timeCount = 150000; public String formatTime(long millis) { String output = "00:00"; long seconds = millis / 1000; long…
marjanbaz
  • 1,052
  • 3
  • 18
  • 35
0
votes
2 answers

Can abstracted CountDownTimer class modify layout view objects linked to an activity?

I am a computer hobbyist who is working on a simple trivia game. In order to increase the difficulty of the game, I'm adding a countdown timer. Initially, I defined a new countdown timer within my GameActivity file, overriding the onTick code so it…
Aaron Delwiche
  • 79
  • 1
  • 10
0
votes
0 answers

jQuery countdown not showing up the expiration div

im doing a countdown in jquery and i have some problems with refreshing the countdwon. Basically the countdown functions fine when refreshing the page if the the counter is expired it wont show the #counterlive div. It will stay at zero. Am i…
dexter4000
  • 77
  • 7
0
votes
1 answer

CountDownTimer's OnFinish() fires when the timer is Halfway in its countdown

I've used a CountDownTimer in an android project, and what happens, is, my OnFinish() fires while the CountDown is in its half way stage. Here is the code : public void ShowNotice(){ cdt = new CountDownTimer(10000, 1000) { …
Priyabrata
  • 1,202
  • 3
  • 19
  • 57
0
votes
1 answer

Use datePicker for countdown

I want to let the user set a countdown with choosing the timeintervall by a datePicker. I only have the layout, but don't know how to program it as I'm very new to Xcode: The time should count down in the label when the button is clicked. Thanks to…
user2242550
0
votes
2 answers

Android : Restore time in resume

I have question i have a chronometer in my app, when i back to my main window, and get back to Timer activity, I just want to resume a time on chronometer from CountDownTimer, how to to this ? Bundle doesn't help me and similar topics :( I will be…
pkruk
  • 809
  • 1
  • 7
  • 24
0
votes
0 answers

Two countdown timers crash in same activity on android? [android]

I have two activity. ActivityA has a countdowntimer and when I start ActivityA , timer starts (60 seconds). In 60 seconds , I start ActivityB and in ActivityA timer continue, Because if I don't do anything in ActivityB, when 60 seconds finish, I…
Emrah Şentürk
  • 107
  • 1
  • 6
  • 10
0
votes
1 answer

Countdown Timer not accurate

I am counting down til midnight in my app. The only problem is that the countdown timer is always off by 5 or more minutes. Its never truly close the the actual time left until midnight. I did the math and am pretty sure it is correct, but maybe I…
heinst
  • 8,520
  • 7
  • 41
  • 77
0
votes
2 answers

get how much time i have before the battery goes to 0% Android

Can i get how much time i have before the battery goes to 0%? Something using a CountDownTimer and making a stime of how much mAh the battery consume? Someone can help me to do it?
David_D
  • 1,404
  • 4
  • 31
  • 65
0
votes
1 answer

Add hours in countdown timer

my code: var mins = 30; var secs = mins * 60; var currentSeconds = 0; var currentMinutes = 0; setTimeout("Decrement("+secs+")",1000); function Decrement(secs){ secs = parseInt(secs); currentMinutes = Math.floor(secs / 60); currentSeconds = secs %…
Jay
  • 3,353
  • 5
  • 25
  • 34
0
votes
2 answers

How to have two timers for Java game applet

I require two timers. One to run the game e.g move objects, and perform checks and another as a countdown timer. I have tried the following: Timer countdownTimer = new Timer(1000,this); Timer gameTimer = new Timer(30,this); public void init() { …
user2488275
  • 87
  • 1
  • 12
0
votes
2 answers

widget updating at specified time with Service and CountdownTimer

I need to update my widget at specified time everyday. Next updating must take place throgh 24 hours. I used updatePeriodMillis but it worked differently for different users. So I decided to implement robust solution. I've found this one and…
Rikki Tikki Tavi
  • 3,089
  • 5
  • 43
  • 81
0
votes
1 answer

storing the current value of countdown timer in variable for using in the template toolkit file

I have a count down timer in the Hours left field, to find the hours left. I also have a field to enter the total estimated time and upon enetering the value of total estimated time, the timer will start. Now my requirement is when ever i changed…
Jenifer_justin
  • 167
  • 1
  • 20
0
votes
1 answer

Adding count down timer in perl template tool kit

I have checked some possibilities for adding a count down timer in a cgi page.But i couldn't find anything helpful. I have written the file to add countdown timer, 'Timer.js' and is calling from the html file 'timer.html'.My problem is i want to…
1 2 3
99
100