[prog] Programming PDA's

Meredydd meredydd at everybuddy.com
Fri Apr 30 10:27:46 EST 2004


On Thursday 29 April 2004 16:30, Dan Richter wrote:
> Can anyone give me a summary of programming on PDA's/Palmtop
> computers? How much portability is there? What languages are most
> supported?

Akk's covered the PDA ground (which I know regrettably little about), so 
I won't add to that, except to say that the Palm emulator installed and 
ran fine for me (although I have yet to make it emulate a 
colour-capable device) and to make a couple of comments about Palm Java 
support later on.

I do quite a bit of programming for mobile phones - the little blighters 
are surprisingly versatile (as well as being surprisingly limited in 
key areas). They're also a lot more common than you'd think - in 
England, almost every phone, even the very low-end ones, support 
applications. Thought I'd share the love...

Some phones (such as O2's XDA) use WinCE. Needless to say, I don't know 
a lot about making these things dance to my tune. In passing, though, 
I've heard of a rather idiosyncratic Java runtime for them (googling 
for "Windows CE Java" throws up a few hits).

Many phones, including the Sendo X and all high-end Nokia models, run 
the Symbian operating system. Akk mentioned this in her mail, calling 
it Epoch. Just to clarify, Epoc was the name of Psion's operating 
system for their organisers. Epoc32 was the 32-bit rewrite which never 
made it to a Psion device, and was instead renamed Symbian. Symbian 
applications won't run on Psions, nor will Psion applications run on 
Symbian (with the exception of OPL programs, for which there is a free 
runtime). Akk said it all, really - open, C++ API, but no Linux 
support :-\

If you're exceedingly lucky, you have a Palm-based phone, such as the 
Treo. Go get the native Palm development stuff - please ignore the 
green-faced, drooling Meredydd on the way out.

If you're exceedingly *un*lucky, you've got a phone which, while new 
enough to support downloadable applications, uses Qualcomm's BREW. This 
is a C++/ARM-based platform, closed standard, Windows dev tools only, 
and DRM'ed to the eyeballs. In addition, the only major network I know 
which supplies them (Verizon Wireless in the US, but there may be 
others, CDMA providers in particular) shuts their users into a "walled 
garden" in which all content is paid-for and from which no access to 
the Internet at large is allowed.

The walled garden concept is also beloved of Hutchinson 3G ("Three"), 
which is making the spectacularly sensible business choice of trying to 
promote coolish application phones, on a high-speed, packet-switched 
data network...by denying them access to the Internet and third-party 
applications. Clever.


That spleen having been vented, we come to my usual stomping-grounds: 
J2ME, aka Java 2, Micro Edition. This is in fact a huge buzzword-grab 
on behalf of Sun, because it covers all their embedded-Java efforts 
(which I've never heard going anywhere) under the same name as their 
mobile-phone-targeted environment (which is *everywhere*). If you want 
to be pedantic, the bit of J2ME to do with mobile phones is MIDP 
(Mobile Information Device Profile, I think).

MIDP essentially defines a subset of the core Java class library (based 
on JDK1.1.8 rather than the later ones), as well as a new set of 
libraries for manipulation of the rather limited user interface, the 
network stack, and persistent storage. In general, it acts very well on 
lower-end phones, but fails to expose as much of the power of 
higher-end phones and PDAs as it should.

It runs, as previously noted, on most mobile phones sold today, as well 
as Palm devices and the RIM Blackberry. Akk's right about the Palm 
runtime - it has all the clunkiness of MIDP on a full-sized PDA, and in 
addition limits your heap size to 64kb (for comparison, Nokia's *first* 
phone to support java clocked in at 160k). It can be worked with, if 
you buckle up tight, but it's a pain. Relief might be in sight - some 
company recently announced a commercial Palm runtime for MIDP2.0 (which 
fixes many of MIDP1.0's limitations - see below) for about $5. I'd 
consider that to be worth it.

The user interface stuff is good for small-capability devices (your 
average mobile), but breaks down on more capable systems - it gives you 
the choice between a very simple forms system and a full-graphics mode 
whose downside is that it does not allow access to text entry routines 
(which, on a mobile, where such routines are essential for anything 
except numbers, is a pain).

Networking is also restricted to HTTP requests only (so as to be 
compatible with WAP, which only supports HTTP), which makes interactive 
network applications a pain. Many of the higher-end phones unofficially 
support TCP sockets, but Nokia (market leader around here) don't on 
anything apart from their 3650, 7250, and 6600 models. Grr.

There is a new revision of MIDP, unoriginally dubbed MIDP2.0. It brings 
official TCP/UDP support, better UI, and fixes some of the more 
unpleasant restrictions of MIDP1.0. Unfortunately, it's only available 
in the very latest phones (from Nokia, only the 6600 supports it), so 
unless you have one yourself, it's not really worth writing to yet. 
There are also a bundle of extra APIs (Bluetooth, Infra-red, etc) which 
are also only supported in the latest batch of phones. A real pity.

I do MIDP an injustice with all this complaining, though - of all the 
mobile/PDA APIs I've seen, it's the one I've found the easiest, even if 
it does come at the expense of power on high-end phones.

---

It rather strikes me that I've just written more of an essay than a 
mailing list post. Oh, well, I hope someone finds it useful...

Meredydd


More information about the Programming mailing list