net.rim.device.api.system
Class GPRSInfo

java.lang.Object
  extended by net.rim.device.api.system.GPRSInfo

public final class GPRSInfo
extends Object

Contains General Packet Radio Service (GPRS) radio information.

Since:
BlackBerry API 3.6.0

Nested Class Summary
static class GPRSInfo.GPRSCellInfo
          Encapsulates information for a General Packet Radio Service (GPRS) cell.
 
Field Summary
static int GPRS_STATE_IDLE
          Represents the GPRS "idle" radio state.
static int GPRS_STATE_READY
          Represents the GPRS "ready" radio state.
static int GPRS_STATE_STANDBY
          Represents the GPRS "standby" radio state.
 
Method Summary
static GPRSInfo.GPRSCellInfo getCellInfo()
          Retrieves information on the current cell.
static int getGPRSState()
          Retrieves the current GPRS state.
static int getHomeMCC()
          Retrieves Mobile Country Code for the home network.
static int getHomeMNC()
          Retrieves Mobile Network Code for the home network.
static byte[] getIMEI()
          Retrieves the International Mobile Equipment Identity (IMEI) of the device.
static byte[] getIMEISV()
          Retrieves the International Mobile Equipment Identity and Software Version (IMEISV) of the device.
static String getRegistrationAddress()
          Deprecated. This method always returns null.
static String getZoneName()
          Retrieves the zone name.
static String imeiToString(byte[] imei)
          Converts the International Mobile Equipment Identity (IMEI) value to a string.
static String imeiToString(byte[] imei, boolean addPeriods)
          Converts the International Mobile Equipment Identity (IMEI) value to a string.
static String imeisvToString(byte[] imeisv, boolean addPeriods)
          Converts the International Mobile Equipment Identity (with) Software Version (IMEISV) value to a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

GPRS_STATE_IDLE

public static final int GPRS_STATE_IDLE
Represents the GPRS "idle" radio state.

In this state, the radio is detached from the network.

See Also:
Constant Field Values
Since:
BlackBerry API 3.6.0

GPRS_STATE_STANDBY

public static final int GPRS_STATE_STANDBY
Represents the GPRS "standby" radio state.

In this state, the network must page the radio to prepare it to receive a downlink packet.

See Also:
Constant Field Values
Since:
BlackBerry API 3.6.0

GPRS_STATE_READY

public static final int GPRS_STATE_READY
Represents the GPRS "ready" radio state.

In this state, the radio is attached to the network, and can send and receive packets.

See Also:
Constant Field Values
Since:
BlackBerry API 3.6.0


Method Detail

getIMEI

public static byte[] getIMEI()
Retrieves the International Mobile Equipment Identity (IMEI) of the device.

Returns:
The IMEI of the device in BCD format.
Since:
BlackBerry API 3.6.0

getIMEISV

public static byte[] getIMEISV()
Retrieves the International Mobile Equipment Identity and Software Version (IMEISV) of the device.

Returns:
The IMEISV of the device in BCD format, or null if the IMEISV could not be retrieved.
Since:
BlackBerry API 4.1.0

imeiToString

public static String imeiToString(byte[] imei)
Converts the International Mobile Equipment Identity (IMEI) value to a string.

Parameters:
imei - IMEI value.
Returns:
Provided IMEI value in string form.
Since:
BlackBerry API 3.6.0

getHomeMCC

public static int getHomeMCC()
Retrieves Mobile Country Code for the home network.

Returns:
MCC for the home network or -1 if not available
Since:
BlackBerry API 4.2.0

getHomeMNC

public static int getHomeMNC()
Retrieves Mobile Network Code for the home network.

Returns:
MNC for home network or -1 if not available
Since:
BlackBerry API 4.2.0

imeiToString

public static String imeiToString(byte[] imei,
                                  boolean addPeriods)
Converts the International Mobile Equipment Identity (IMEI) value to a string. See http://en.wikipedia.org/wiki/Imei#Structure_of_the_IMEI_and_IMEISV.

Parameters:
imei - IMEI value.
addPeriods - If true, the id will be delimited by periods.
Returns:
Provided IMEI value in string form.
Since:
BlackBerry API 4.0.2

imeisvToString

public static String imeisvToString(byte[] imeisv,
                                    boolean addPeriods)
Converts the International Mobile Equipment Identity (with) Software Version (IMEISV) value to a string. The Luhn check digit at byte 15 is discarded and byte 16 is BCD decoded to form the 2 digit Software Version number. See http://en.wikipedia.org/wiki/Imei#Structure_of_the_IMEI_and_IMEISV. This method performs no checks to see whether the byte array that is being passed is a valid imeisv, or whether the string being returned is a valid Imeisv.

Parameters:
imeisv - IMEISV value.
addPeriods - If true, the id will be delimited by periods.
Returns:
Provided IMEISV value in string form.
Since:
BlackBerry API 4.3.0

getGPRSState

public static int getGPRSState()
Retrieves the current GPRS state.

Returns:
One of these values: GPRSInfo.GPRS_STATE_IDLE, GPRSInfo.GPRS_STATE_STANDBY, or GPRSInfo.GPRS_STATE_READY.
Since:
BlackBerry API 3.6.0

getRegistrationAddress

public static String getRegistrationAddress()
Deprecated. This method always returns null.

Retrieves the registration address.

Returns:
Null.
Since:
BlackBerry API 3.6.0

getZoneName

public static String getZoneName()
Retrieves the zone name.

Returns:
Time zone name in string form.
Since:
BlackBerry API 3.6.0

getCellInfo

public static GPRSInfo.GPRSCellInfo getCellInfo()
Retrieves information on the current cell.

Returns:
GPRS cell info structure for the current cell.
Since:
BlackBerry API 3.6.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal