In Android, Chronometer is a class that implements a simple timer. Chronometer is a subclass of TextView. This class helps us to add a timer in our app. You can give Timer start time in the elapsedRealTime() timebase and it start counting from that. If we don’t give base time then it will use the time at which time we call start() method. By default a chronometer displays the current timer value in the form of MM:SS or H:MM:SS.
Questions tagged [chronometer]
302 questions
1
vote
1 answer
Using both timer and countdown timer in android app
I am developing an android app in which I need to show the remaining time in which a user can complete a certain task that is a countdown timer. If the user exceeds the stipulated time, the timer should start counting up or become a Chronometer. So,…

AmrataB
- 1,066
- 2
- 10
- 19
1
vote
1 answer
start chronometer from dialog box
I would like my chronometer start when i click "ok" button from my Dialogbox... I can not.
I only succeed to start my chronometer when dialog box open. Then when i click "ok" button time has passed...
Thanks for your help... I begin to code.
My…

Gekemidec
- 11
- 1
1
vote
2 answers
Keep Android chronometer active even after app is killed
I'm using Chronometer in android app for count up timer.
Chronometer base is 0.
I want to keep a track of elapsed time since chronometer started, even after app is in BG, or killed.
I also, want to update timer on UI, when app is reopened.
I went…

pratiti-systematix
- 792
- 11
- 28
1
vote
1 answer
Chronometer restarts on change orientation
I reset the chronometer value when you change the orientation, has written is true, but does not help, ask for help, what went wrong
@Override
protected void onSaveInstanceState(Bundle outState) {
timer = SystemClock.elapsedRealtime() -…

No Name
- 741
- 8
- 18
1
vote
1 answer
Allow App Timer To Run When Screen Is Locked
I'm making my own running app for Android and I have a timer that should announce the time every 5 minutes using TextToSpeech. I'm using a Chronometer.OnChronometerTickListener to track the time and trigger the audio output. It works fine when the…
user5313110
1
vote
4 answers
Custom Count Up Timer
I need a count up timer in my application. I browsed many forums about this subject, but I could not find anything. Actually I understood we can do this with chronometer, but I have 2 problem with chronometer:
I cannot using chronometer in Service…

Rambod Ghasemi
- 51
- 1
- 2
- 11
1
vote
3 answers
Welcome activity in android
I am making an app in android for which I need a welcome activity. I want to intent my welcome activity automatically after five seconds.Should i use a chronometer for that?

Saif Arsalan
- 359
- 1
- 3
- 7
1
vote
4 answers
Android Chronometer - Save time
I´m using a Chronometer in my Android App. I can start it, stop it and continue counting after pushing the start button again:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle…

Snowman
- 169
- 4
- 17
1
vote
1 answer
Chronometer android
Help me please, i did my fist android app, chronometer, but something is wrong here and i dont know what. When I clicked Start the chronometer runs normal, but when I clicked Stop(or Reset), then Start again to continue it will be 00:0(, 00:0*,…

tuan tran
- 29
- 4
1
vote
2 answers
Inheritance and private variables in Java
I'm trying to add a method to the Chronometer class in android. It stores the start time in this variable:
private long mBase;
so I thought I could do this
public class MyChronometer extends Chronometer{
public void reset(){
long now =…

guribe94
- 1,551
- 3
- 15
- 29
1
vote
1 answer
Creating a running stopwatch in Android for timing intervals
I want to create a stopwatch in my Android application that starts running when the user presses start and continues to run and enables the user to time specific intervals.
Use case: The user presses "start timing" and the stopwatch starts. The user…

Digital Da
- 891
- 1
- 10
- 23
1
vote
0 answers
Maintaining a chronometer for multiple fragments in swipe tabs
I have swipe tabs (6 fragments) for which I try to maintain each a chronometer. The problem is that the onPause is called after the 3rd tab so I have no ways to stop the chrono.
Is there a way to force an onPause after each tab move?
Having a…

narb
- 958
- 1
- 13
- 39
1
vote
1 answer
How to set Chronometer in milliseconds (MM:SS:mm)
I have a chronometer used as a timer in a game. Currently it only shows seconds (by default). I have been trying to get the format to show in minutes:seconds:milliseconds. I tried but nothing is working. Here is the code I found on StackoverFlow…

newbdeveloper
- 97
- 2
- 3
- 12
1
vote
1 answer
How do I save chronometer elapsed time in android app
I'm developing a sort of parking meter counter app for a few specific locations. The app asks the user where he is (dropdown menu, saves column letter and number, like A6) and then shows a screen with the given location, a timer (chronometer class)…

iVikD
- 296
- 7
- 21
1
vote
0 answers
how to set a list of stopwatch in android?
I want to create an android list of stopwatch.
I intent that every stopwatch will start counting down 5 minutes after first click only.
I have had few questions:
I have tried to use chromometer, but it's counting time up (meaning starting at 00:00…

Elad Benda2
- 13,852
- 29
- 82
- 157