title: How to debug an AlarmManager-activated service
body: <p>I am implementing a widget that checks on-line train departure times between every minute and every hour, depending on the time of day.
  Calling the service with</p>
  
  <pre><code> manager.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP,
          SystemClock.elapsedRealtime() - 10000, 60000, pendingIntent)
  </code></pre>
  
  <p>works fine, but for debugging I would like to reduce the interval to about 10 seconds which cannot be done because of the 1-minute limit in more recent versions of Android. Clearly, I don't care about battery life in the emulator.</p>
  
  <p>As far as I understand, using an Hander/Timer is not an option, because it required the task to be in the foreground. Is a visible widget "in the forground"?
  What is the recommended practice in this case?</p>