Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 7
Registered: ‎09-08-2008
My Device: Not Specified

Determining if Device is a BlackBerry or Other J2ME Phone

Is there a System.getProperty() 'key' that I can use to determine if the device I'm on is a BlackBerry? This is for a J2ME application to determine its device at runtime.

 

I want to put this determination in my code so that I can use the same JAD file for all devices supported by my application. This is because the BlackBerry needs the extra ";deviceside=true" for HTTP connections (and other stuff) that is specific to the BlackBerrys.

 

P.S. thanks for the input so far - really speeds up development.

 

Mike

Developer
Posts: 507
Registered: ‎07-15-2008
My Device: Not Specified

Re: Determining if Device is a BlackBerry or Other J2ME Phone

[ Edited ]

Try this way:

 

 

System.getProperty("microedition.platform")

 

for Blackberry device it should return:

 

RIM Wireless Handheld

Message Edited by rafo on 09-10-2008 11:06 AM
----------------
if your issue solved set "Solution" mark at the relevant post
New Member
Posts: 1
Registered: ‎07-20-2010
My Device: Not Specified

Re: Determining if Device is a BlackBerry or Other J2ME Phone

More recent Blackberry versions report "Blackberry <platform #>" instead of "RIM Wireless Handheld", this stuffed us (and at least one other software vender) up :-(