yes, I set a flag before calling a function which calls the timer, and after calling cancel, I modify the flag value, after calling the function, I checked the flag but this did not work correctly.
thanks for your reply On Tue, May 1, 2012 at 5:01 PM, Kristopher Micinski <[email protected]>wrote: > what did you try? > > How did it not work? > > Did you set a flag somewhere before calling cancel? > > Or what? > > kris > > On Tue, May 1, 2012 at 7:49 AM, Mai Al-Ammar <[email protected]> > wrote: > > I tried to track it by myself but I could not :( > > could you please help me with an idea of tracking. > > > > On Tue, May 1, 2012 at 2:22 PM, Mark Murphy <[email protected]> > wrote: > >> > >> This has nothing to do with Android. There is no method on TimerTask > >> to tell you it is canceled, so you will need to track that yourself by > >> some other means. > >> > >> On Mon, Apr 30, 2012 at 8:16 PM, Mai Al-Ammar <[email protected]> > >> wrote: > >> > Hello every one, > >> > > >> > I have a simple question about timer in Android, How can I know if the > >> > timer > >> > is stopped or not? > >> > I have an if statement which see if some condition is satisfied, then > it > >> > will stop the timer by : > >> > if(timerTask != null) > >> > timerTask.cancel(); > >> > I want to check after calling the timer if the timer is stopped or > not? > >> > > >> > Please help me > >> > > >> > thanks in advance > >> > > >> > -- > >> > Mai A. Al-Ammar > >> > Teacher Assistant > >> > Imam Mohammad bin Saud Islamic University > >> > College of Computer Science > >> > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups "Android Developers" group. > >> > To post to this group, send email to > [email protected] > >> > To unsubscribe from this group, send email to > >> > [email protected] > >> > For more options, visit this group at > >> > http://groups.google.com/group/android-developers?hl=en > >> > >> > >> > >> -- > >> Mark Murphy (a Commons Guy) > >> http://commonsware.com | http://github.com/commonsguy > >> http://commonsware.com/blog | http://twitter.com/commonsguy > >> > >> Android App Developer Books: http://commonsware.com/books > >> > >> -- > >> You received this message because you are subscribed to the Google > >> Groups "Android Developers" group. > >> To post to this group, send email to > [email protected] > >> To unsubscribe from this group, send email to > >> [email protected] > >> For more options, visit this group at > >> http://groups.google.com/group/android-developers?hl=en > > > > > > > > > > -- > > Mai A. Al-Ammar > > Teacher Assistant > > Imam Mohammad bin Saud Islamic University > > College of Computer Science > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > > http://groups.google.com/group/android-developers?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

