Science Fair Project Encyclopedia
MIDlets will (should) run on any device that implements J2ME Mobile Information Device Profile. Like all Java programs, MIDlets are "compile once, run anywhere". To write a MIDlet, you can get Sun's Wireless Toolkit from the Java website, which is available on several platforms and is completely free.
Hints for writing MIDlets:
- Heap sizes can be very small, around 20kb. Therefore, use as few objects as possible and dereference them when they are no longer needed. Also catch OutOfMemoryErrors if you intend to allocate larger amounts of data.
- Programs can not expect more than 8kb persistent storage . Don't keep more than you need.
- Keep in mind that a device can have very different screen dimensions, orientations and color depths. In other words, don't use absolute position.
- Not all devices have keypads or pointers. One should be able to use the program with both. Key layouts may vary too, so use Game Actions for up-down-left-right-action style events.
- Don't white list devices. If the program hasn't been tested on a specific device, assume it works. Never attempt to block the user from trying it.
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details