To make some action for some time I found that there are several choices:
- use AlarmManager
- use ScheduledExecutorService
- use Handler's method postDelayed
What is big difference of all this? What is the best practice of making schedule action?
To make some action for some time I found that there are several choices:
What is big difference of all this? What is the best practice of making schedule action?
Hello,
AlarmManager
is independent of your app and guarantees that the task will run.
The other two run as a part of Activity
/Service
with according life cycle restrictions (e.g. can be killed anytime).