title: Alarm manager with elapsed realtime to fire immediately and repeat every 4 hrs
body: <p>How to set up a repeating alarm to fire immediately when a Button is pressed and repeat itself in every 4 hrs.?</p>
  
  <pre><code>alarmMgr.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(),   
  4*60*60*1000, alarmIntent);
  </code></pre>
  
  <p>Repeats itself but doesnt start immediately when a Button is pressed. it takes 5 mins to fire.</p>
  
  <p>What am I doing wrong here?</p>
  
  <p>I changed the code as below and the alarm is fired immediately</p>
  
  <pre><code>alarmMgr.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, AlarmManager.INTERVAL_FIFTEEN_MINUTES, 4*60*60*1000, alarmIntent);
  </code></pre>
  
  <p>but it doesn't repeat every 4 hrs. How can I make the alarm repeat every 4 hrs?</p>