Craig,
Yes. Handle the event _before_ it is passed to SysHandleEvent.
Sample:
static Boolean PreprocessEvent( EventPtr event )
{
Boolean handled = false;
// We want to allow the app event handler to see the command keys
// before any other event handler gets them.
if ( event->eType == keyDownEvent ) {
// Stop Palm OS from switching away from us if the Antenna
is raised.
if ( event->data.keyDown.chr == vchrHardAntenna )
handled = true;
}
return handled;
} // end PreprocessEvent
fragment of app event loop
if ( !PreprocessEvent( &event ) )
{
if ( !SysHandleEvent( &event ) )
Regards,
Randy Maxwell
-----Original Message-----
From: Craig Torell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 01, 2001 5:36 PM
To: Palm Developer Forum
Subject: Disabling Palm VII Transmitter
Is there a way to completely prevent the Palm VII radio from operating? I
need to be able to do this because the unit will used to collect data in a
location where the transmitter interferes with other electronics. At a later
time and place, the app is supposed to be able to transmit the data
wirelessly. The user is not to be able to use the radio except under direct
control of the app I am writing, and then only under password protection.
When using the notification manager to send sysNotifyAntennaRaisedEvent to
my app (via sysAppLaunchCmdNotify launch code), I set "handled" in the
parameter block to "true", hoping that would keep the system from turning on
the radio (I also used priority "-15" when registering for the
notification). The only effect this has, however, is to prevent the device
from switching to whatever app has been specified in the user preferences
panel for the "antenna raised" event. Although this was encouraging, the
device still "clicks" when the antenna is raised, still "chirps" as if it's
doing a coverage check, and still functions normally if I tap a PQA icon. In
other words, trapping and discarding the AntennaRaised event in my
notification handler is not enough to prevent the radio from activating.
Is there any way to do this? Thanks for anyone who can help!
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/