Combee on Palm OS

Thursday, 19 May 2005  11:21 PM

Both the Tungsten T5 and the new LifeDrive have an application on them called "Files".  This is the file manager that lets you navigate the collection of files that's on your SD card or on the internal volume.  To support opening files on external media, palmOne has extended the Exchange Manager by defining some new values.

Traditionally, an application registers for a file extension or MIME type and says that it will process items that match that registration when they are received via a beam or some other exchange library.  This is done using the Exchange Manager function ExgRegisterDatatype along with one of the constants exgRegExtensionID or exgRegTypeID.  In the palmOne SDK, the header file "common/libraries/filebrowser/FileBrowserLibCommon.h" defines these values:

#define exgRegEditCreatorID     0xff7b // creator ID registry
#define exgRegEditExtensionID   0xff7d // filename extension registry
#define exgRegEditTypeID        0xff7e // MIME type registry

These are new values you can pass to ExgRegisterDatatype to tell the system that your application can handle opening files on a VFS volume that match a particular creator ID, extension, or MIME type. More details on registering to handle files on external media, how to register icons to go with those types, and what to do when the system tells you to open a file are in the palmOne Developer Guide in the "File Browser API" section. On devices with this API, there's also several shared library calls that you can use to present "open file" and "save file" dialogs.

While the file browser APIs are palmOne-specific, the methods of registering with Exchange Manager and having a file browser application activate registered programs have been submitted back to PalmSource for standardization in their Palm OS APIs. The scheme isn't too bad and fits in with the other uses of Exchange Manager, so I hope they accept it as an OS-wide standard.

[Note: if any of you are developers of software that have the ability to unzip files, adding support for this would be a very, very, very cool thing. Hint, hint.]