HOME   |  ARTICLES   |  LEARN J2ME   |  DID YOU KNOW |  TESTS |  SHOPPING |  ABOUT DUCKLING |

Advertisements


Home > Articles > PDAP Profile
PDAP: J2ME programming for Windows Pocket PC, Palm OS and Linux Mobile

Introduction

This article discusses development of J2ME applications on PDA's viz Palm OS, Win CE and Linux. Palm OS device was the first device to support J2ME. In one of those SunOne Conferences J2ME was released and the attendees where told to Hotsync their devices for J2ME at the booths. These guys then Hotsynced their Palm tops but didn't know what to do with it as there where no applications for them to install.

But now after a few years there are millions of applications out there. In those days nobody assumed J2ME will become so popular. The mobile vendors got into frenzy porting KVM to their devices mainly due to the portability of J2ME, and PDA's were a neglected lot.

At the same time PDAP(PDA Profile) was also in picture but this JSR moved at a snails pace mainly due to politics and the confusion as to whether the profile should be in CDC or CLDC and its relation with MIDP. Fortunately for us the PDAP JSR has now come to a partial conclusion. PDAP is similar to MIDP in most aspects except that in PDAP optional packages like Personal Information Management (PIM) and File Connection (FC) are made mandatory. The biggest advantage for a developer is not the features it provides but that PDAP has finally been launched. After years of waiting a standard PDA Profile with support for Palm OS, Win CE and Linux is up and running.

PDAP however does not address the some important issues like portable synchronization technology but the mature development community has found number of work arounds.Lets cut all this crap and come to a conclusion- "PDAP is tweaked MIDP, the KVM's for PDA's come in different flavors"

PDA VM's(Virtual Machines) come in different flavors. But the standard VM's and supported devices are next few sections.

Kilo Virtual Machine(KVM)

This VM was the first VM for PDA's, Also called MIDP4PALM and Java HQ. This VM was a Sun's first Reference implementation.
MIDP Version: MIDP 1.0/CLDC 1.0
Supported Devices: Older versions of the Palm OS devices like Visor, Palm IIIXe, Sony Clie etc

Build Procedure:

IBM J9VM

The PDAP JSR's main members are IBM and Palm and not surprisingly the reference implementation is tightly clubbed to IBM WebSphere Device Developer(WSDD) but is a portable platform for Palm OS, Win CE and Linux.
MIDP Version: MIDP 1.0/CLDC 1.0 and MIDP2.0/CLDC1.1
Supported Devices: Newer Vesions of Palm devices like Treo, Win CE and Sharp Zaurus(Linux based)

Build Procedure:

Legacy VM's

There are a couple of other VM's like kJava and pJava and kAWT which have now become a legacy and are non standard VM's.

Conduit Development in Palm Devices

When the HotSync button is clicked on the device, HotSync Manager on the Desktop is notified that it should start the HotSync process and the list of applications which have to be synced are sent to it. This list of applications can be configured on the device in HotSync preferences. The HotSync manager syncs each application with default conduit which does default synchronization if no custom conduit is registered.

Hotsync

You can also write your own conduit in Java or VB. However for the recent versions Java support for Hotsync is not given by Palm Source. This custom conduit is registered with the HotSync Manager which can then query the device database and use this data to embed another desktop database or file.

Web Sphere Device Developer(WSDD)

WSDD is IBM's proprietary integrated J2ME tool for developing applications for PDA's and Mobile Phones. This tool is an Eclipse based IDE and comes with emulators for various devices.

WSDD is not a free tool but is a very good integrated environment for developing PDA applications. The trial version is available for download but the Application executable size is restricted to 30 KB.

Problems and Trouble Shooting

The KVM runs in an area of memory known as dynamic heap. MIDP applications that require more dynamic heap memory than is available on a device may quit and return you to the application launcher or sometimes throw "out of memory" exception.

The solutions to this problem are changing the preferences of the KVM.

Conclusion

By now you should have understood that the best environment for PDA' development with J2ME is IBM J9VM along with WSDD. Biggest advantage being possibility of a portable solution for Palm OS, Win CE and Linux.