"McKee, Kevin L." <[EMAIL PROTECTED]> wrote in message
news:12553@palm-dev-forum...
>
> Is there a way or a system call that I can do that will tell my program
that
> the Palm has gone into sleep mode?

Hi Kevin.  I am assuming this is a regular application you're working on.
You can register to receive Notification Manager messages if your app runs
on Palm OS 3.5 or greater.  If you catch the sysNotifyLateWakeupEvent or
sysNotifyEarlyWakeupEvent, you can then perform a FrmGotoForm() to jump to
your login page.  The notification will come to you by means of a launch
code, to be caught in your PilotMain function.  I do not know empirically if
your app will see this launch code if it wasn't the current running app when
the device went to sleep, but this is a pretty easy one to test out.  Be
sure you pass NULL as your SysNotifyProcPtr when you register to receive
this notification.

If you're running on an earlier version of the OS, you'll find that the
Notification Manager ceases to exist.  Your code can test for its presence
using FtrGet(sysFtrCreator, sysFtrNumNotifyMgrVersion, &value).  On pre-3.5
OS's, I think your only choice is to utilize a shared library to catch a
wake-up.
PalmOS shared libraries provide you with an entry point that is called for a
few reasons, one of which is when the device wakes up out of sleep mode.
Therein, you can jump to your login screen (even if you were not the
currently-running app when the device was put into sleep mode).  Read this
for more info on shared libraries:
http://oasis.palm.com/dev/kb/article.cfm?id=1670

As an aside, a shared library on the Symbol SPT1740 will not behave the
same, due to the addition of a second sleep mode to accommodate its radio
powerhandling routines.  Send me an email if this is your scenario.  Good
luck!

-Jeff Ishaq
[EMAIL PROTECTED] <strip xx>





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