How To Detect If A Java ME Phone Supports A Particular JSR
July 6th, 2009
A few weeks ago, I had the need to detect if a Java enabled phone supported JSR 179 (Location API for J2ME). Since then, I came accross the need to detect support for other JSRs.
The required information can be determined by calling
System.getProperty(propertyName);
If the string returned by the getProperty returns a non NULL string, it implies the particular JSR is supported.
Here is a summary of a few JSRs along with their corresponding propertyNames :
| JSR 75 (FC) | microedition.io.file.FileConnection.version |
| JSR 75 (PIM API) | microedition.pim.version |
| JSR 82 | javax.bluetooth.LocalDevice |
| JSR 120 | javax.wireless.messaging.MessageConnection |
| JSR 135 (MMAPI), Check If Audio Capture Supported | supports.audio.capture |
| JSR 135 (MMAPI), Check If Video Capture Supported | supports.video.capture |
| JSR 179 | microedition.location.version |