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

Native Development

Reply
New Contributor
Posts: 2
Registered: ‎04-03-2013
My Device: Dev Alpha
My Carrier: Rogers

Accessing the phone's mobile country code

Hi,

 

I have been trying to access the mcc of the phone.

 

Currently I am getting the mcc with the CellularNetworkInfo class using the mobileCountryCode() method.

 

This method is returning to me a QString with the numeric mcc in it. Is this always guaranteed to be numeric or does it depend on the network the phone is connected to?

 

Is there any way using the provided libraries to either extract or convert this to an ISO 3166-1 (2 letter) country code?

 

Thanks for any help that anyone can provide on this subject.

Highlighted
Retired
Posts: 54
Registered: ‎06-26-2012
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Accessing the phone's mobile country code

Mobile Network Code (MNC):
    Yes, only numbers, it is the unique identifier for the country where
    the network is located. The MNC is composed of 2 or 3 decimal digits.
    For details about the structure of the MNC, see ITU-T recommendation E.212.

ISO 3166-1 country code:
    We have only ISO 3166-1 alpha-3. Please check countryCode () in http://developer.blackberry.com/cascades/reference/qtmobilitysubset__qgeoaddress.html