"Anthony Randazzo" <[EMAIL PROTECTED]> wrote in message
news:54193@palm-dev-forum...
> How does the Clipper browser figure out which mail client to launch...
In Palm OS 3.2 through 3.5, Clipper was hard-coded to use iMessenger. In
Palm OS 4.0, it uses the Exchange Manager's registry for the "mailto" URL
scheme. Here's how it works...
Clipper calls ExgRequest which queries the registry. It'll find all mail
clients that have registered for this URL scheme. Mail apps normally
register for this URL scheme when they receive a sysAppLaunchCmdSyncNotify
launch code (unless they're in ROM, in which case this is done on a hard
reset). Here's how a fictitious mail app called "Super Mail" might register
for the mailto URL scheme:
ExgRegisterDatatype(kSuperMailCreatorID, exgRegSchemeID, "mailto",
"Super Mail", 0);
If several apps have registered for the mailto URL scheme, it'll use the
default. One can be set as the default using ExgSetDefaultApplication. If
none is set as the default, one will be chosen arbitrarily. Once the app is
chosen, it's sublaunched with the sysAppLaunchCmdGoToURL launch code. The
mailto URL, with all the usual parameters (to, cc, subject, body, or any
subset) is passed in via the command parameter block. The mail app is
responsible for parsing this URL. It can SysUIAppSwitch to itself if it
can't operate modally.
If an app is deleted, it is automatically unregistered.
Apps that register for "mailto" should generally include a preference for
letting the user choose which of the various mail clients should handle
mailto URLs. To implement this UI, use ExgGetRegisteredApplications to build
the list, ExgGetDefaultApplication to set the default selection in the list,
and ExgSetDefaultApplication when the user picks from the list.
The HostTransfer demo exchange library includes some sample code along these
lines. There may be other examples as well. Take a look at the apps included
in the 4.0 SDK.
--
Danny @ Palm
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/