• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

api for knowing api j2me device supports

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
wrangler
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks that solves my problem...rgds.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic