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

Determine the Current Network Name

by Retired ‎02-16-2010 10:48 AM - edited ‎09-16-2010 02:43 PM (1,989 Views)

Summary

 

This article applies to the following:

  • BlackBerry® Device Software 4.2.1 and later
  • BlackBerry® Java® Development Environment (JDE) 4.2.1 and later

Description

 

Third-party developers commonly request a way to determine the name of the current network on which the BlackBerry smartphone is registered. This name can then be used to determine several important pieces of information, including the following:

  • BlackBerry smartphone features - Some wireless service providers may not have enabled certain features on the BlackBerry smartphone.
  • Roaming status – If the BlackBerry smartphone is currently roaming, this may present additional barriers including the inability to access wireless service provider specific Transmission Control Protocol Access Point Names (TCP APNs) and wireless service provider specific location servers. This, in turn, may also incur additional data or voice costs for the BlackBerry smartphone user.
  • Billing activity – Knowing the current wireless service provider can help determine any potential billing activities associated with an application.

In BlackBerry Device Software 4.2.1 and later, a new method has been added to the RadioInfo class to provide the current network name. To determine the current network name, use the following call:

 

 

String networkName = RadioInfo.getCurrentNetworkName();
System.out.println (“Network Name: “ + networkName );

The following code can be used to identify whether a BlackBerry smartphone is currently roaming:

 

 

int networkService = RadioInfo.getNetworkService();
if ( (networkService & RadioInfo.NETWORK_SERVICE_ROAMING) != 0)
//BlackBerry smartphone is roaming

 

Note: The BlackBerry smartphone must be registered with a network for these methods to work.


 

Contributors
Users Online
Currently online: 24 members 1,283 guests
Please welcome our newest community members: