Fwiw, I am not aware of any issues with the alarm itself not waking up the
phone.  Typically bugs in this area are a result of applications not holding
wake locks the entire time needed.

Note that the behavior when not holding a wake lock can change significantly
between devices, depending on things like how often sync is running.

On Tue, Nov 18, 2008 at 6:15 PM, Adam K <[EMAIL PROTECTED]> wrote:

>
> Ping.  Anyone?  It seems for certain people the alarm can never wake
> up the phone.  For others (like myself) it pretty much always wakes up
> the phone.
>
> Thanks,
>
> Adam
>
> On Nov 16, 8:15 pm, "Adam K" <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I noticed that AlarmManager does not always seem to wake the device
> > correctly when using types RTC_WAKEUP or ELAPSED_REALTIME_WAKEUP.  It
> > seems like whatever intent was pending is triggered later after the
> > Menu key is hit.
> >
> > I realize you need to hold a wakelock for any activity fired after the
> > initial pending intent event - but I thought at least the pending
> > intent should execute without a wakelock being required?  All I want
> > to do is set off a Notification when the alarm is complete - nothing
> > else.
> >
> > It does seem to work 90% of the time without an issue, just not 100%
> > of the time.  Has anyone else noticed this?
> >
> > Here is a summarized version of what I'm doing:
> >
> > //in main activity, set alarm for some time in future
> > myPendingIntent = PendingIntent.getBroadcast(myContext, 0, new
> > Intent(myContext, MyReceiver.class), 0);
> > myAM = (AlarmManager) getSystemService(ALARM_SERVICE);
> > myAM.set(AlarmManager.RTC_WAKEUP, getTriggerTime(), myPendingIntent);
> >
> > //in MyReceiver.class, onReceiver(), trigger notification
> > NotificationManager myNM = (NotificationManager)
> > context.getSystemService(Context.NOTIFICATION_SERVICE);
> > Notification notif = new Notification();
> > ..setup notification to play alarm, vibrate etc.
> > myNM.notify(MYNOTIFICATION_ID, notif);
> >
> > Thanks,
> >
> > Adam
> >
>


-- 
Dianne Hackborn
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
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