If I recall correctly, for a Palm device to auto-off, it sends two
keyDownEvent messages, the first has event.data.keyDown.chr set to
vchrAutoOff, and the second has event.data.keyDown.chr set to vchrPowerOff.
If these events do not make it to SysHandleEvent(), then the device will NOT
power down.

Also, if somehow the low memory byte, globals.sysAutoOffSeconds, got set to
zero, then your device will not auto-off.  Doing a shortcut dot dot 3
typically sets globals.sysAutoOffSeconds to zero.

Doug.


-----Original Message-----
From: Gert-Jan Vons [mailto:[EMAIL PROTECTED]]
Sent: Tuesday December 18, 2001 13:07
To: Palm Developer Forum
Subject: What can keep a device from doing an auto-off?


Hello all,

in my app, I use an alarm to do some processing every day at midnight. The 
alarm goes off every night, and the app then decides whether or not to 
display an alert.

Over the last couple of months, I've had two users report that my app keeps 
their devices awake when it displays the alert, their devices doesn't go to 
sleep afterwards as one would expect.

One uses a Palm V, OS 3.3, the other uses a Visor Edge, OS 3.5.2. No hacks, 
normal auto-off after 2 or 3 minutes, and the devices are not in the cradle 
"so stay on when in cradle" should not be an issue either.

What my app does:

sysAppLaunchCmdAlarmTriggered

         program the alarm for tomorrow

sysAppLaunchCmdDisplayAlarm

         display alert using FrmDoDialog()

         (Like the pre-4.0 datebook used to do, I'am using
         an event handler to filter the appStopEvent so that a
         hardware button press doesn't switch apps)

I don't call any of the auto-off related functions, and everything works 
fine on a lot of other palms.

I've already made the timer configurable instead of being fixed at 00:00, 
but I'd like to know what might be going on here...

     Gert-Jan


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

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

Reply via email to