Dr. Vesselin Bontchev wrote:
Vesselin referred to bypassing the default popup clock when you
press the 5-way ctr on a sleeping device. This can certainly be
done, because I do precisly that on my own T3 with my own app.
Ah, I wasn't referring to having an application that I am writing to do that. I
was wondering whether it could be done by the user (not the programmer) of the
device - whether you could specify somehow from the user interface which
application is to be run when the middle button of the 5-way control is pressed
while the device is off.
Right. That's different.
I guess it cannot be done, then? If I don't control the source of the
application that has to pop up, I mean.
You are probably right there. I would imagine that there would have to
be a system preference setting to define which app is given control when
the button is pressed. I haven't seen such. We also have to remember
that the app would have to be designed to work that way. For instance,
the default behaviour is to popup, display while the button is pressed,
and go back to sleep, leaving the foreground app intact for the next
power-up. Typical clock apps would not do this. They could perhaps be
launched with SysUIAppSwitch(), leaving the device powered-on, but that
would perhaps be the wrong behaviour.
Well, I guess I could always write a launching application that intercepts this
button and launches whatever I want... If I go this way, which virtual
character or notification or whatever should I be listening to?
IIRC, I just detect the wakeup, and figure out which button caused the
power to come on (don't remember if I just look for a character code or
look at the keyCurrentState bitfield). This works on the T3, but
definitely NOT on the Treos, and I would guess that more devices act
UNLIKE the T3 than like it, in this respect. On most devices I advise
people to map one of the std 4 hardbuttons, as they DO work much more
consistently. I allow the popup to happen with power on or off, and
each state has to be handled differently. With power on I definitely
look for the key code.
Is it the same virtual character that is generated when tapping the clock icon
on the silkscreen?
I don't use that clock icon, because it doesn't exist on many devices.
Bob.
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/