difference between timer and alarmmanager
<p>I am a bit confused about <code>Timer</code> and <code>AlarmManager</code> used in Android. </p>

<p><em>What are the main differences between them</em>? </p>

<p>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?</p>

<p>For example, for X situation, use <code>Timer</code> but on the other hand, for Y situation, use <code>AlarmManager</code>.</p>
