How to get ISO CountryCode , Country Code programmatically in blackberry?

368 views Asked by At

Is there any way to retreive the ISO Country Code/Country programmatically in Blackberry 5.0/6/0 devices

1

There are 1 answers

0
Mister Smith On

You can obtain the country from the mobile network (if a SIM card is present). This is called Mobile Country Code. It is a number that you can then map to a string. In the API you have GPRSInfo.getHomeMCC. You can also call RadioInfo.getMCC and even RadioInfo.getNetworkCountryCode, that will already return the text if the carrier supports it.

And to get the ISO code of the device language, you can call Locale.getDefaultForSystem().getCountry().