ProcAlarms are not supposed to fully wake the device by themselves, and if
it's the only thing going on, should only cause the device to wake up half
way - CPU running and screen off - and eventually go back to sleep.

The problem is that you and your ProcAlarm may not be the only thing going
on. Other recipients of the sleep related notifications will be doing
whatever it is they do when the device wakes, and other ProcAlarms may be
firing, too. Different platforms, OS versions and aggregations of software
act defferently, as well. Trying to keep track of the exact state of the
device can be like herding cats.

For instance, with sleep/wake notification, there are devices and
circumstances where the device should half-wake and then go back to sleep,
but that's not what you see. You may expect to get the early wakeup, no late
wakeup, and then the sleep event and notification sequence. Instead, you see
early wakeup, an unexpected late wakeup, followed quickly by some sort of
'go back to sleep' event, and then the sleep event and notification
sequence. The casual observer never sees the device fully wake, since it did
so for only a few ticks, but your software sees it.

You app needs to be flexible in it's interpretation of device state.


On 2/8/07, Michael Smith <[EMAIL PROTECTED]> wrote:
>
> I'm trying to do the same thing (only have an action taken if the device
> is sleeping). The approach I'm taking though is that when the app gets a
> notification that the device is waking up or going to sleep I set a variable
> in my database that says whether the device is 'awake' or 'asleep'. I'm
> still working on it so I don't know whether or not this approach will work,
> but it's something to consider.
>
> Michael
>
> On 2/7/07, Alexander R. Pruss <[EMAIL PROTECTED]> wrote:
> >
> > Do you actually want the scheduled alarms to be going off with the
> > device sleeping?
> >
> > If yes, then I wonder if you're registering for early or late
> > wakeup?  Since proc alarms aren't supposed to wake up the device, I am
> > guessing that at least late wakeup ('lazy'--someone has a sense of humor)
> > should not get generated.
> > --
> > For information on using the PalmSource Developer Forums, or to
> > unsubscribe, please see http://www.palmos.com/dev/support/forums/
> >
>
> -- For information on using the PalmSource Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/support/forums/
>



-- 
yisdersomenimororsisasisdenderisorsis?
Jeff Loucks

-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to