Elements in a Palm Application

Now that you know how to design a Palm application, let’s describe its two components. After that we will look at how they communicate with each other.

The Two-Part Solution

Most Palm solutions are composed of a handheld application and desktop conduit:

The handheld portion

The portion that resides on the handheld and allows the user to view and manipulate data. Part II, deals with the creation of this part.

The conduit portion

Here you have code that handles syncing the data with a desktop application. Part III, shows you how to create this part.

The handheld portion has an icon that is displayed in the application list. Users will usually use the Palm Install Tool from a Windows or Macintosh machine to install your application (it’ll be installed on the next synchronization).

HotSync Overview

When a user puts a Palm OS device in its cradle and presses the HotSync button, the handheld application begins communicating with the desktop conduit. For example, the Address Book has a built-in conduit that synchronizes the address book information on the handheld with the address book information in the Palm Desktop PIM. If a new entry has been made in either place, it is copied to the other. If an entry has been modified either place, it is copied to the other. If an entry has been deleted in one place, it is usually deleted in the other.

Third parties provide other conduits that replace the Address Book conduit so that the device’s address book synchronizes with other PIMs (Microsoft Outlook, for example). You’ll usually want to write a conduit for your application’s database that will upload/download information in a manner appropriate for your application.

For example, the Expense conduit reads the expense information from the handheld, fills in a spreadsheet based on the information, and then deletes the information from the handheld. From the users’ point of view, this is ideal; they get their information in a standard, easy-to-use form: a spreadsheet on the desktop. The Palm OS application doesn’t have to worry about creating reports; its only purpose is recording expense information.

If you don’t want to write your own conduit, then a backup conduit is provided. It backs up any database that:

  • Doesn’t already have a conduit responsible for it

  • Has been marked as a database that should be backed up

Note

There have been four different Windows versions of HotSync shipped to users (1.0, 1.1, 2.0, and 3.0). You’ll probably want to target HotSync 1.1 or later. It’s also reasonable to target HotSync 3.0, since it is available by download from http://www.palm.com.

Get Palm Programming: The Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.