Developing for MIDP Devices
MIDP or "Mobile Information Device Profile" is the most widly supported mobile platform, which allows you to create your application for various operating systems like Symbian, Motorola OS, Nokia OS, Samsung OS, and more.
All MIDP devices support either the CLDC 1.0 or CLDC 1.1 configurations. The "Connected Limited Device Configuration"
provides basic Java mechanisms like Threading and some mobile extensions like the Generic Connection Framework. The most
notable extension of CLDC 1.1 is the support of floating point calculations, which need to be emulated with tools like
Floater on CLDC 1.0 devices. Fortunately, CLDC 1.0 devices are quite rare in most markets nowadays.
Some MIDP devies additionally support the much more powerful CDC / "Connected Device Configuration", which provides a nearly full blown Java Virtual Machine like Java SE 1.3.
MIDP comes in 3 different flavors:
- MIDP 1.0: The initial version is now universally and very stable supported but has little multimedia and graphical options.
- MIDP 2.0: Most phones nowadays support the MIDP 2.0 standard, which provides interesting yet basic graphical, multimedia
and security options.
Almost all phones support different additional APIs that are defined by the
Java Community Process.
The multimedia (e.g. sound playback) and graphical extensions (e.g.
Graphics.drawRGB()) suffer from different implementations and device bugs. The Java Technology for the Wireless Industry and the Mobile Service Architecture standards limit the fragmentation.
- MIDP 3.0: The MIDP 3.0 standard is currently under public review,
no commercially available devices are known to support this standard yet.
Well, MIDP 3.0 seems to be dead in the water.
When using the J2ME Polish UI, you can use all MIDP 2.0 components like CustomItem on
MIDP 1.0 devices as well. You can even use the gaming API
javax.microedition.lcdui.game with some limitations
on MIDP 1.0 phones.
Java FX and Java FX Mobile
Java FX and Java FX Mobile are Sun's competition to Flash/Flash Lite and Microsoft's Silverlight. Java FX is currently under development and it remains to be seen if it catches on. Java FX Mobile does currently run only on CDC, not on mainstream CLDC devices. While Java FX provides a very interesting environment, it remains to be seen how it copes with device fragmentation and if it can compete with Flash and Silverlight.
Programming with MIDP
Programming MIDP applications is very simple:
javax.microedition.midlet.MIDletand implement the
- Create a user interface using the highlevel
javax.microedition.lcduiAPI, for example with List or Form.
- You can store data on the device using the lowlevel
javax.microedition.rmsAPI or the highlevel Persistence framework of J2ME Polish.
- Access network resources using the lowlevel
javax.microedition.ioGeneric Connection API or the highlevel RMI and XML-RPC framework of J2ME Polish.
Depending on your application you need to reserve 50% up to 90% of your work for porting your application. When you use J2ME Polish components and APIs, however, you don't need to port these, as they are automatically adjusted to your target devices during the build time.
Building MIDP Applications
Building your mobile application means that you compile
your optionally preprocessed
Java source code, add resources like images to it,
application and package your application into a JAR/JAD bundle.
These steps along with localization, serialization and more are automated with J2ME Polish. Pushing a button is enough.
Future of MIDP
While MIDP is almost universally supported it is also notorisly known for its fragmentation. While tools like J2ME Polish help you to overcome this fragmentation barrier, you still have to consider differences and device bugs of the various platforms. In the long run it is expected that the mobile Java ME standard gradually fades away and is replaced by the standard Java SE platform, as mobile devices become more and more powerful. For the next 5 years, however, we expect that Java ME will keep being the most widly supported platform there is for mobile development.
MIDP programming itself is very simple and effective. Using the highlevel User Interface API you can realize comlex UIs very quickly. MIDP is a very good general purpose platform for realizing mobile applications, but you have to deal with device fragmentation in varying degrees.