1

I want to schedule a recurring action in my Activity (I am using Activities and Places design pattern). When my user leaves a place associated with this activity, how quickly can I expect this action to stop? Will the inclusion of the recurring action somehow affect the way an Activity is disposed of?

I don't need an immediate guarantee. If an activity is disposed of normally, it's acceptable in my use case.

Andrei Volgin
  • 40,755
  • 6
  • 49
  • 58

1 Answers1

1

It is your responsibility to cancel anything that you started in your activity, if you need/want so.

With a Scheduler.RepeatingCommand, you'd have to keep the command around and, in the activity's onStop, set a flag on it so that the next time it's run it exits early and returns false.

Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164