Thanks for your relpy. I am running into some other issues using this approach.
I tried the following: handle the sysNotifySleepNotifyEvent - this time I save the status so that my application knows that the device is sleeping handle the sysNotifyLateWakeupEvent - this time I toggle the status so that my application knows that the device is awake. The problem is that when my procedure alarm fires, before my function executes, I receive a sysNotifyLateWakeupEvent that toggles the status to awake. Hence, my function never executes its code. Also in my sysNotifyLateWakeupEvent handling routine I have no way to tell that this event was a result of the procedure alarm being fired or an actual wakeup through some other means. Is it normal for the system to send a wakeup event before calling the procedure function? I have not tested my procedure alarm on the T5 but on the Treo Simulator it does the following when the device is sleeping- 1)fire wakeup event 2)execute the alarm function 3)fire sleep event to go back to sleep Is that a normal sequence of logic execution or am I missing something? Thanks Sohil -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Aaron Hansen Sent: Wednesday, March 16, 2005 5:53 PM To: Palm Developer Forum Subject: RE: Please Help!!: Best way to find out if the device is in sleep mode You can register for notifications that will tell you when the device goes to sleep and when the device wakes up. I would just capture those and set some status in your app (maybe use feature memory) that you could check to see if it's ok to run or not. Note my email earlier that procedure alarms wake up T5's and turn on the screen. It works fine on older devices though. Notifications and the wake and sleep notifies are documented in the PalmOS Companion PDF that comes with the SDK's. Hope that Helps, Aaron >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Sohil Shah >Sent: Wednesday, March 16, 2005 3:27 PM >To: Palm Developer Forum >Subject: Please Help!!: Best way to find out if the device is >in sleep mode > > >What is the best way to find out if the device is in sleep mode. > >I have a procedure alarm that needs to execute its code only >if the device is in sleep mode. If the device is in use by the >user, the function must simply exit. > >Is there any API call to find out what mode the device is >currently in. I have looked at the API reference extensively >but no luck. > >Please help. > >Thanks >Sohil >-- >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/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/