I'm trying to pause a countdown timer using the .cancel() function. But it won't pause.
I'm trying to do a new CountDownTimer() with the time (to count down from) assigned by the number entered into a text box ("Number Decimal" box).
For example, the user would type in "3", hit start, and it would count down from that.
From here, where would I start?
new CountDownTimer(30000, 1000) {
public void onTick(long millisUntilFinished) {
timeLe
I have written a class inside one activity to display a hh:mm:ss timer in my activity:
This is code of the class designed to show the timer:
//class to display on screen timer
class ShowTimer
{
long mMilliseconds = 120000;
SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat("HH:mm:ss");
CountDownTimer mCountDownTimer = new CountDownTimer(m
I would like to know if it is possible to repeat a countdowntimer infinitely ?
I have implemented a countdown timer in an application of mine. It runs in the background fine and dandy, but when i use advanced task killer, it stops the timer and the only way to restart it is to open the application again.
I have 6 Buttons, for 1st 3 Buttons i want to start same activity and for other 3 Buttons separate new activities.
So problem arises when i click on 1st button and then the second Button which starts same activity because we can not start same activity from same activity.
So I just need to know weather the activity which i am going to start is the same activity which is running, based on that if
I am currently attempting to pass a string across activities. The string is used to set an image in the second activity. So the user is clicking a button in the first activity and then the appropriate image is loaded in the second activity based upon what was selected.
In my broadcast receiver activity I need to run some code when an alert is fired which I can get working no problem, but I need to make sure my Map activity is on the screen when this code is run, so I am trying to start the Map activity with an intent but this crashes the application and I do not know why.
so i made 2 apps and i wanted to run the activity of one app from the activity of the other app. i can do that by passing a intent from the first app to start the second app. we were required to have a permission tag in activity to do that and which works. but the only situation it doesnt work is when i try running the second app activity(which is the one im talking about).