I'm writing an alarm clock app and I'm using the AlarmManager to start
up my Activity using a PendingIntent. This works 100% on the emulator,
and 100% on a phone that is awake, but only 90% of the time when the
phone is asleep. The 10% "failure" is a 2 minute delay in the alarm
going off. The phone still wakes up and the alarm goes off, but 2
minutes after the scheduled time.

I've sprinkled the onCreate of my activity with many Log.v("..."); to
try and identify what is happening. What I've found is that my
Activity is indeed being started at the correct scheduled moment, but
a 2 minute pause occurs (actually, it's almost exactly 117 seconds) at
seemingly random places within the onCreate function. After the 2 mins
are up the Activity::onCreate continues, wakes the phone, displays the
alarm screen and sets off the alarm audio. Everything works, but just
2 mins too late.

It only happens 10% of the time, but when it happens it's in a
different part of the onCreate method. I know this as I'm checking the
log outputs and the 117 second pause occurs in a different part each
time.

The only consistency between log reports is that no other logs are
occurring during this pause, not from my app or any other app, except
occasionally from a system process. I find that strange, usually
there's always something being output to the log, but to have a gap in
the log that's 2 minutes long, it's as if the phone was doing nothing
for 2 minutes.

Has anyone seen this behaviour in their phone waking Activity's?

My phone is the Galaxy Nexus, Android 4.0.1

Any thoughts, half baked or otherwise, would be much appreciated.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to