Friday, June 05, 2009

Running J2ME on Android

Now that I have my new Android Developer Phone 1 (aka, HTC Dream or T-mobile G1), I'm investigating how to develop apps on it

There is a complete new toolkit (Android SDK) and Eclipse Plugin (which includes the emulator). And a tonne of new APIs to learn (growl)

But what about J2ME? It's not natively supported on the Android platform.

Lucky for us, there are 2 "emulators" / Bridges for it.

(1) Assembla J2ME Android Bridge: This is a set of bridging libraries - just port your code to the Android eclipse  platform, plug these libraries (which emulate javax.microedition.*) and away you go. Although only tested on  1.0r2 and I just upgraded to Android 1.5.. ggrr

(2) Run an emulator on Android. Not the fastest thing to do. Try http://www.netmite.com/android/ aka the MIDP runner. Hey, this supports the Bluetooth API too!! Great.

(3) My preferred alternative is to use J2ME Polish. This development platform is great - you write to their libraries, and then choose the device to build against. The beauty of this is that you can choose other targets too like Nokia, Blackberry, Android, generic J2ME devices etc. And you use CSS styles to decorate your application. And includes HTML/RSS browser widgets in addition to the usual microedition.lcdui stuff.
Also apparantly it has a Windows Mobile, iphone and Palm target for builds. Assuming you have the relevant toolkits installed of course :-)

No comments: