Hi, Is there any API querying which the midlet application can know whether or which version of cldc/midp/wma/mmapi.... the device supports? thanks
James Reilly
wrangler
Ranch Hand
Joined: Oct 01, 2003
Posts: 30
posted
0
Some of these might help, depending on what you are trying to accomplish:
- checking the values of system properties 'microedition.profiles', 'microedition.configuration', etc.
- Using a try / catch block for 'Class.forName(String className)' and ClassNotFoundException might help an application to infer that some API (e.g. from an optional package) is available or not. This might be helpful in some specific cases (e.g. sound effects). But it ought to be used judiciously, if at all.
- Some optional package APIs may also provide some additional support. For example, the JSR-82 Bluetooth API allows one to query a device property 'bluetooth.api.version', using the JSR-82 API specific class javax.bluetooth.LocalDevice. [ July 13, 2004: Message edited by: James Reilly ]
Avinash Mangipudi
Greenhorn
Joined: Jan 01, 2004
Posts: 26
posted
0
thanks that solves my problem...rgds.
Robert Virkus
Greenhorn
Joined: Jun 26, 2004
Posts: 16
posted
0
This stuff is best done during the preprocessing phase, e.g.
Or:
The above examples assume that you are using J2ME Polish (http://www.j2mepolish.org), which has an integrated device database and powerful preprocessing capabilities.
Using this approach saves you a lot of runtime and jar size.
Best regards, Robert
J2ME Polish<br />A suite of tools for J2ME developers.<br /><a href="http://www.j2mepolish.org" target="_blank" rel="nofollow">http://www.j2mepolish.org</a>