I am a bit confused about Timer and AlarmManager used in Android.
What are the main differences between them?
They are both scheduling a task to run at every A seconds. And what is the main scenario that they are preferred to be used?
For example, for X situation, use Timer but on the other hand, for Y situation, use AlarmManager.