Hi Gavin
This is how i check for Sleep Mode. I am unable to get into the case.
static void AppEventLoop(void)
{
UInt16 error;
EventType event;
do {
EvtGetEvent(&event, evtWaitForever);
if (event.eType == sysNotifyLateWakeupEvent)
// Open Serial Comm.
if (event.eType == sysNotifySleepRequestEvent)
// Close Serial Comm.
if (! SysHandleEvent(&event))
if (! MenuHandleEvent(0, &event, &error))
if (! AppHandleEvent(&event))
FrmDispatchEvent(&event);
} while (event.eType != appStopEvent);
}
Please advise.
Regards,
Andrea
-----Original Message-----
From: Gavin Maxwell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 21, 2001 2:52 PM
To: Palm Developer Forum
Subject: RE: Trapping Sleep Mode
There are virtual characters posted when the device is about to enter sleep
mode.
vchrAutoOff is the one you're after most likely, or
vchrPowerOff, or
vchrHardPower (user pressing power button)
If you are running on a device with the Notification Mgr (OS 4.0) you can
register for these instead of checking keyDown events:
sysNotifySleepRequestEvent
sysNotifySleepNotifyEvent
Note that these may not be posted in all circumstances (ie emergency power
off due to extremely low battery)
If your intention is to stop the device going to sleep then you might want
to look at these instead:
EvtResetAutoOffTimer
EvtSetAutoOffTimer
Regards,
Gavin.
-----Original Message-----
From: Andrea [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 21, 2001 4:11 PM
To: Palm Developer Forum
Subject: Trapping Sleep Mode
Hi,
Does anyone knows how to trap an event when Palm is entering Sleep mode?
Please advise.
Regards,
Andrea
--
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/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/