HI there.  I'm trying to fake a "power on" event in order to put up a
password screen when the palm is powered on.  It does not appear that
an event is generated when power on occurs -- at least not on the
emulator.  I'd prefer to do this entirely using supported APIs.

I've attempted to use the Notification Manager, but had absolutely no
luck with it.  In particular, I don't get a app launch code at all!  If
anyone (devsupp?) has working code of this, I'd love to see it.  It
seems like it is exactly what I'd like to do.

My workaround is to set have EvtGetEvent() timeout after a few seconds
(ie, 5) and generate an event that I can use to check if the timeout has
occured.  In this way, the unit can wake up, and a few seconds later, a
nilEvent will be generated which can be used to allow an entry point to
check if the passowrd is necessary.  Operationally, this is suboptimal.
The unit powers on, and asks for a passcode a few minutes later.  In
addition, it asks for a password independent of poweron, which I was
explicitly trying to avoid.  I could force the issue by watching the
powerOFF event (which can be monitored), but that is even messier.

Also, the docs suggest that having a EvtGetEvent timeout prevents (?)
the processor from going into Doze mode.  Does this really have an(y)
impact on battery life?

So, this is the behaviour I'm trying to create:

If my app is running, I want to be able to run code at poweron which can
check if a password is needed.  Any help appreciated -- I feel dumb, but
this really shouldn't be rocket science.

Sanjay


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