How about just periodically calling EvtResetAutoOffTimer to prevent the unit from sleeping. Its much less complicated (and dangerous) than altering the sleep timeout or trapping and posting sleep messages.
----- Original Message ----- From: "Jason Wei" <[EMAIL PROTECTED]> Newsgroups: palm-dev-forum To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Friday, May 17, 2002 12:08 AM Subject: Problem about sleep mode > Dear all: > > I am a newbie in Palm OS programming. And I have a question to ask all > experts. > My problems is as follows. For some reason, I need to prevent Palm OS to go > to > sleep mode. Therefore, I register the sysNotifySleepRequestEvent and > increase > deferSleep when AP receive the sysAppLaunchCmdNotify. > > Finally, I can prevent system to go to sleep mode. But I don't know how to > restore > it when exit from AP to OS system. How can I do to restore the sysytem sleep > mode > to regular? As wrote in Palm Companion, I should create a keyDownEvent > with > resumeSleepChr and command key bit set and add it to event queue. But I > don't understand > what is command key and how to put it to event queue? Can anyone tell me > more > clearly? Thanks a lot.... > > -Jason Wei > > > > > > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
