BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 10-22-2004, 02:06 PM   #1
tliou
Knows Where the Search Button Is
 
Join Date: Oct 2004
Location: Dallas
Posts: 23
Default Retrieve model info in Java.

Please Login to Remove!

How do you obtain model info (7100, 7510, etc.) from within Java code?
Offline  
Old 10-22-2004, 03:43 PM   #2
Mark Rejhon
Retired BBF Moderator
 
Mark Rejhon's Avatar
 
Join Date: Aug 2004
Location: Ottawa, Ontario, Canada
Model: Bold
Carrier: Rogers
Posts: 4,870
Default

I did some research to try to find out...

The closest thing I found was the "DeviceInfo" class ...Such as DeviceInfo.getDeviceId() .... Try researching in that direction.

I heard using the IMEI code (TAC?) will tell you whether you are on GSM or on iDEN. (Which would distinguish the 75XX).

The vendor.xml file does seem to produce ID codes that may correspond to device models, but I am not sure.
__________________
Thanks,
Mark Rejhon
Author of XMPP extension XEP-0301:
www.xmpp.org/extensions/xep-0301.html - specification
www.realjabber.org - open source
Offline  
Old 10-22-2004, 04:05 PM   #3
tliou
Knows Where the Search Button Is
 
Join Date: Oct 2004
Location: Dallas
Posts: 23
Default

Mark,

The getDeviceID() method in DeviceInfo class returns an int. I'm not sure how you can obtain model info from that.

Thomas
Offline  
Old 10-24-2004, 05:20 PM   #4
berryapps
Thumbs Must Hurt
 
Join Date: Oct 2004
Posts: 60
Default

getDeviceId() is useless to you. It would return the blackberry PIN number.

each blackberry model has a different screen height/width in pixels. You can easily match up which blackberry they are using through that.

Cheers,
Andrew
Offline  
Old 10-25-2004, 08:59 AM   #5
tliou
Knows Where the Search Button Is
 
Join Date: Oct 2004
Location: Dallas
Posts: 23
Default

Wow, it is unbelievable that you have to do it that way :(

You would think a simple API can do the same.
Offline  
Old 10-25-2004, 09:11 AM   #6
berryapps
Thumbs Must Hurt
 
Join Date: Oct 2004
Posts: 60
Default

I guess it's because it's irrelvalent which model you are running on from a code standpoint.
Offline  
Old 10-25-2004, 09:15 AM   #7
tliou
Knows Where the Search Button Is
 
Join Date: Oct 2004
Location: Dallas
Posts: 23
Default

Well, not if your app in about management of various PDAs.
Offline  
Old 10-25-2004, 09:26 AM   #8
berryapps
Thumbs Must Hurt
 
Join Date: Oct 2004
Posts: 60
Default

Yes... very true. I keep forgetting that people develop apps for more than the blackberry.
Offline  
Old 10-25-2004, 09:48 PM   #9
Mark Rejhon
Retired BBF Moderator
 
Mark Rejhon's Avatar
 
Join Date: Aug 2004
Location: Ottawa, Ontario, Canada
Model: Bold
Carrier: Rogers
Posts: 4,870
Default

Detecting screen colors and screen resolution should help greatly. For example, a monochrome 240x240 screen is almost guaranteed to be a 65XX or 67XX series BlackBerry. Then you might be able to decode the IMEI to determine if it's an iDEN network code -- that would isolate it down to 65XX series.

Monochrome
5XXX and 6XXX series

Color
7XXX series

240x160
58XX, 62XX and 72XX series

240x240
65XX, 67XX, 75XX and 77XX series

240x260
71XX series
__________________
Thanks,
Mark Rejhon
Author of XMPP extension XEP-0301:
www.xmpp.org/extensions/xep-0301.html - specification
www.realjabber.org - open source
Offline  
Old 10-26-2004, 10:30 AM   #10
tliou
Knows Where the Search Button Is
 
Join Date: Oct 2004
Location: Dallas
Posts: 23
Default

Thanks, Mark.

net.rim.device.api.system.Display has the following methods to helpyou obtain those info.

isColor()
getWidth()
getHeight()

Also, 4.0 will drop the following models. 58XX and 65XX
75XX is 240 by 160, not 240 by 240.
71XX is 240 by 260.

The only models are hard to tell (in 4.0) is 72XX or 75XX since both are 240 by 160 and color.

Thomas
Offline  
Old 10-26-2004, 01:44 PM   #11
jbartel
Knows Where the Search Button Is
 
Join Date: Sep 2004
Posts: 17
Default

net.rim.device.api.system.RadioInfo.getNetworkType () will get the network type so you can tell between:
7510 and 72xx
7750 and 7730/7780
6750 and 6710/6720
6510 and 62xx
Offline  
Old 10-26-2004, 02:14 PM   #12
tliou
Knows Where the Search Button Is
 
Join Date: Oct 2004
Location: Dallas
Posts: 23
Default

OK, with all the info, here is the code that SHOULD identify most models in 4.0.
Code:
    int heigth = Display.getHeightxxx40;xxx41;;
    boolean color =  Display.isColorxxx40;xxx41;;

    if xxx40; heigth == 260 xxx41;
        model = "7100";
    else if xxx40; heigth == 240 xxx41; xxx123;
        if xxx40;colorxxx41;
            model = "7700";
        else
            model = "6700";
    xxx125;
    else if xxx40; heigth == 160 xxx41; xxx123;
        if xxx40;colorxxx41; xxx123;
            if xxx40;RadioInfo.getNetworkTypexxx40;xxx41;==5xxx41;
                model = "7500";
            else
                model = "7200";
        xxx125;
        else
            model = "6200";
    xxx125;
    else
        model = "Unknown";
Thomas

[Edit: Mark Rejhon added [code] and [/code] wrappers for formatting code.]
Offline  
Old 11-01-2004, 04:44 PM   #13
berry_apps
Thumbs Must Hurt
 
Join Date: Aug 2004
Posts: 52
Default

Offline  
Old 01-17-2005, 10:49 AM   #14
tliou
Knows Where the Search Button Is
 
Join Date: Oct 2004
Location: Dallas
Posts: 23
Default

I'm reposting the result responded by someone.

Use DeviceInfo.getPlatformVersion()

Thomas
Offline  
Old 02-11-2005, 12:13 PM   #15
tliou
Knows Where the Search Button Is
 
Join Date: Oct 2004
Location: Dallas
Posts: 23
Default

Oops, wrong API. Use DeviceInfo.getDeviceName() instead. It will return 7100, 7510, etc.
Offline  
Old 02-17-2005, 09:17 AM   #16
wiktorn
Knows Where the Search Button Is
 
Join Date: Jan 2005
Location: Poland
Posts: 17
Default

That's right.
Functions you mentioned appeal in 4.0 OS finally.

Wojtek
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


BECO Universal Impedance Bridge Model 315A, Brown Electro Measurement Corp. 315A picture

BECO Universal Impedance Bridge Model 315A, Brown Electro Measurement Corp. 315A

$139.00



TC ESI Impedance Bridge Model 250-DA Serial 1394 Electro-MeasurementS Oregon USA picture

TC ESI Impedance Bridge Model 250-DA Serial 1394 Electro-MeasurementS Oregon USA

$69.99



Digital Ohmmeter LCD Audio Impedance Test Meter Speaker Voice Resistor System picture

Digital Ohmmeter LCD Audio Impedance Test Meter Speaker Voice Resistor System

$56.99



IMPEDENCE MATCHING TRANSFOMER BNC F-BNC F, 50 OHM TO 75 OHM, 20-1100 MHZ picture

IMPEDENCE MATCHING TRANSFOMER BNC F-BNC F, 50 OHM TO 75 OHM, 20-1100 MHZ

$28.00



HP 41951-69001 Impedance Test Adapter picture

HP 41951-69001 Impedance Test Adapter

$795.00



BECO Universal Impedance Bridge Model 315A, Brown Electro Measurement Corp. 315A picture

BECO Universal Impedance Bridge Model 315A, Brown Electro Measurement Corp. 315A

$129.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.