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: 38
Registered: ‎01-21-2009
My Device: Not Specified

MNC function

We don't know how the phone is storing the information, nor does it really matter, the issue at hand is the fact that the OS 4.6 and under function is returning decimal, and OS 4.7 is returning hex.
BlackBerry Development Advisor
Posts: 15,811
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: MNC function

The value should be hex in all cases.  I tried this using BlackBerry handheld software version 4.5.0 (8310), 4.6.1 (8900) and 4.7.0 (9500) and the same value was returned in all cases.  What BlackBerry Smartphone model and BlackBerry handheld software version are you testing on?  You can find this under Options, About on the BlackBerry Smartphone.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
New Developer
Posts: 38
Registered: ‎01-21-2009
My Device: Not Specified

Re: MNC function

OS 4.5 on a 8310, I forget the JDE version, but I suspect 4.7 fixes the issue, but you most deff have to convert the decimal value to hex in previous versions.
New Developer
Posts: 38
Registered: ‎01-21-2009
My Device: Not Specified

Re: MNC function

Some old code I wrote for the 8310:

add(new LabelField("Mobile CC: "+Integer.toHexString(GPRSInfo.getCellInfo().getMCC())));

but not the MNC

add(new LabelField("Mobile NC: "+RadioInfo.getMNC(RadioInfo.getCurrentNetworkIndex()));

Highlighted
Developer
Posts: 177
Registered: ‎01-21-2009
My Device: 9900
My Carrier: Vodafone

Re: MNC function

This issue is with the GPRSInfo.GPRSCellInfo API in 4.7. It has been logged as a bug at RIM. The workaround is to use

 

 

RadioInfo.getMCC( RadioInfo.getCurrentNetworkIndex() )

 

And you will get the hex value.