I’m noticing a strange thing with Alarms on Android – they don’t always wake up the device at the correct intervals. For example, if I set an alarm to start a service every 5 minutes (using RTC_WAKEUP, or similar), everything works fine until the device goes to sleep – after that, the alarm may not fire for minutes, or close to an hour. It usually does fire eventually – and it always fires if I wake the device by pressing Menu. Using repeating alarms (vs. re-setting them each time) has the same effect.
So my question is, are alarms guaranteed to fire at proper intervals when the device is asleep? I understand that I shouldn’t expect millisecond or second precision, but tens of minutes?
I’ve never programmed on Android but I was kinda bored so I googled around and found this, which seems to be very related: http://groups.google.com/group/android-developers/browse_thread/thread/f0303a539de3a74a (you’ll need to sign in to your google account in order to read it)