Mobile networks are uniquely identified by their
mobile country code (MCC) and their mobile network code (MNC) and
applications may need to identify the network that the BlackBerry
smartphone is currently operating on.
For example, the application may require this information
to determine the correct access point name (APN) for making a Wireless
Application Protocol (WAP) or Transmission Control Protocol (TCP)
connection. For information on different ways to make a Hypertext Transfer
Protocol (HTTP) or socket connection, see DB-00396.
For information on specifying APN information for a direct TCP connection,
see DB-00532.
The following table below shows how an application can determine
the MCC or MNC of the current network.
| Network code |
Method |
| MCC |
RadioInfo.getMCC() |
| MNC |
RadioInfo.getMNC() |
Notes
- The MNC and MCC will be returned as decimal
numbers, whereas MCCs and MNCs will be listed as hexadecimal numbers.
For example, a BlackBerry smartphone operating on the AT&T®
mobile network will return MCC=784 (hex 310) and MNC=896 (hex 380).
- MCCs in the United States are 3 digits in length; therefore
the corresponding hexadecimal value returned by
getMCC()or getMNC()may
contain the letter F as padding. For example, for T-Mobile®, the
MCCs can be identified as either 260 or 26F.
- If you call
RadioInfo.getNumberOfNetworks()followed
by RadioInfo.getNetworkId()for each index from zero
to the number of networks, you may see MCC/MNC pairs duplicated.
This occurs because the network offers more than one level of network
service, such as Enhanced Data Rates for Global Evolution (EDGE)
and 3G (High-Speed Downlink Packet Access (HSDPA) on the AT&T
network.