J2ME Phone Quirks

Developing mobile phone applications using J2ME can be a nightmare of navigating the quirks of the various phone implementation of the CLDC and MIDP specifications (or 'Dancing Around Device Limitations' as Robert Virkus aptly describes it in the book 'Pro J2ME Polish').

In general, Nokia and SonyEricsson phones are reasonably straightforward to work with, Motorola can be tricky/clunky and Samsung Java implementations (and the associated quirks) seem to change with every phone model.

Herewith a list of some of the quirks I've encountered. There are other lists scattered around the 'net - the J2MEPolish 'issues database' and the Nokia lists being the most useful.

+ Nokia

+ 6020

  1. A MIDlet JAR file must be less than 100kb.

+ 6103

  1. A corrupted install file freezes the whole phone, necessitating a phone restart.

+ 6170

  1. A received SMS timestamp may not reflect the correct timezone.

+ 6230i

  1. The 'middle' menu item (i.e. for enter/fire) is shown in bold until the text gets too long. It then displays the menu text using a plain font and if that is still too long uses an ellipsis ('...').

+ 6233

  1. Requires a locator string of the form "capture:://image" for snapshots.

+ 6300

  1. Requires a locator string of the form "capture:://image" for snapshots.

+ 6600

  1. Maximum icon size is 29x29.
  2. The automatic resizing of icons produces some bizarre results.
  3. Sets the HTPP request header Connection: close automatically and overrides Connection: Keep-Alive

+ 7260

  1. A received SMS timestamp may not reflect the correct timezone.

+ 9200

  1. Downloaded JAD files must have the extension .jad to install correctly.
  2. Sets the HTPP request header Connection: close automatically and overrides Connection: Keep-Alive.

+ 9300i

  1. If the phone complains of an "Invalid install package" and you are certain the MIDlet JAR file is fine, use the Nokia PC Suite File Manager to delete all the old downloaded MIDlets and try again.
    Setting the "Delete source file after installation" setting in [Tools/Control Panel/Data Management/Application Manager/Preferences] to YES doesn't avoid the problem.
  2. Downloaded JAD files must have the extension .jad to install correctly.
  3. Sets the HTPP request header Connection: close automatically and overrides Connection: Keep-Alive.

+ 9500

  1. Downloaded JAD files must have the extension .jad to install correctly.
  2. Sets the HTPP request header Connection: close automatically and overrides Connection: Keep-Alive.

+ N90

  1. A received SMS timestamp may not reflect the correct timezone.

+ SonyEricsson

+ K700i

  1. Does not display MIDlet icon.

+ P1i

  1. Need to assign MIDlet account in Control Panel/Security/MIDlet accounts to allow it to access the Internet.

+ T610

  1. Seems to need numeric IP address for HttpConnection.
  2. Does not display the MIDlet icon.

+ W810i

  1. Required Thread to yield() to allow form to repaint.
  2. The form title takes up 28 pixels of the 176 pixels of the canvas height.

+ Motorola

+ RAZRV3

  1. Only has one font.
  2. The font metrics are incorrect and can't be used for layout.

+ V1050

  1. Canvas height is reported as 269 but the form title takes up 30 pixels of that.

+ V360

  1. Only has one font.
  2. The font metrics are incorrect and can't be used for layout.
  3. The canvas height is reported as 182 but form title takes up 22 pixels of that.

+ Samsung

+ SGH-D500

  1. Absolutely requires JAD file for loading a MIDlet over OTA.

+ SGH-D600E

  1. To receive an SMS, the receive port must be the same as the port used to send an SMS.
  2. A binary (data) SMS is padded with trailing zeroes.
  3. A binary (data) SMS is corrupted if the most-significant bit is set i.e. can only use 7 of the 8 eight bits in a byte.
  4. The timestamp on a received SMS seems to be decoded randomly.

+ SGH-D900

  1. Cannot receive an incoming SMS unless the MIDlet is registered with the push registry (either statically or dynamically).
  2. Prompts for �Allow to start periodically ...� when unregistering from the PushRegistry.
  3. A MessageConnection can only receive SMS's on ports 16000 to 16999.
  4. HttpConnection cannot access ports other than 80 and 8080.
  5. Does not display the MIDlet icon.

+ SGH-E370

  1. Cannot receive an incoming SMS unless the MIDlet is registered with the push registry (either statically or dynamically).
  2. A MessageConnection can only receive SMS's on ports 16000 to 16999.
  3. A received SMS timestamp seems to be decoded to an arbitrary time.
  4. Does not display the MIDlet icon.

+ SGH-i900 (Omnia)

  1. Cannot receive an incoming SMS unless the MIDlet is registered with the push registry (either statically or dynamically).
  2. Requires the MessageConnection to be closed after every transaction.
  3. Some version of the firmware seem to send an HTTP POST request with an invalid Content-Length header (e.g. Content-Length 0,288) which can cause havoc with HTTP servers. Use a GET request rather.
  4. The small font is absolutely huge.

+ SGH-U700

  1. The touch sceen user interface aborts the MIDlet at the slightest excuse.

+ SGH-X820

  1. Cannot receive an incoming SMS unless the MIDlet is registered with the push registry (either statically or dynamically).
  2. Reregistering an already registered MIDLet with the PUSH registry causes inexplicably bizarre problems. Unregister the MIDlet before registering it.
  3. Valid SMS ports are in the range 16000 to 169999.
  4. MessageConnection returns only the source port for a received SMS (no MSISDN).
  5. A received SMS timestamp seems to be decoded to an arbitrary time.
  6. HttpConnection will only connect to port 80.
  7. The RMS is cleaned regardless when updating a MIDlet.

+ SGH-Z400V

  1. The browser often stops being able to make a connection after using GPRS in Java. Only solution is to restart the phone. And sometimes the MIDlet will not be able to use GPRS after the browser has been in use.
  2. Does not decode an SMS date correctly at all � year comes out as 2076.
  3. Canvas height is 279. Form title takes up 16 pixels of that.

+ SGH-Z500V

  1. A binary (data) SMS is corrupted if the most-significant bit is set i.e. can only use 7 of the 8 eight bits in a byte.
  2. Canvas height is 289 but the form title takes up 16 pixels.
  3. Does not like transparent pixels in MIDlet icon.
  4. The rounded rectangle rendering is terrible and particularly inconsistent for small corner radii.

+ i-mate

+ K-JAM

  1. Does not support SMS.
  2. Loses all information and sometimes the MIDlet if the battery is allowed to run flat.

+ PDA2K

  1. Does not support SMS.

+ SP3

  1. Does not support SMS.
  2. Loses all information and sometimes the MIDlet if the battery is allowed to run flat.

+ htc

+ Research in Motion

+ BlackBerry 8310

  1. COD file must start with an alpha character. All numeric file names get an underscore prefix which causes havoc with the desktop manager.

+ LG

+ T5100

  1. HTTP connection doesn't work.

+ Sun Wireless Toolkit

  1. JAR.exe directory needs to be on PATH for preverification to avoid a puzzling 'preverification error' otherwise.