to top
Android APIs
public class

NeighboringCellInfo

extends Object
implements Parcelable
java.lang.Object
   ↳ android.telephony.NeighboringCellInfo

Class Overview

Represents the neighboring cell information, including Received Signal Strength and Cell ID location.

Summary

Constants
int UNKNOWN_CID Cell location is not available
int UNKNOWN_RSSI Signal strength is not available
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<NeighboringCellInfo> CREATOR
Public Constructors
NeighboringCellInfo()
This constructor was deprecated in API level 5. by NeighboringCellInfo(int, String, int)
NeighboringCellInfo(int rssi, int cid)
This constructor was deprecated in API level 5. by NeighboringCellInfo(int, String, int)
NeighboringCellInfo(int rssi, String location, int radioType)
NeighboringCellInfo(Parcel in)
Initialize the object from a parcel.
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
int getCid()
int getLac()
int getNetworkType()
int getPsc()
int getRssi()
void setCid(int cid)
This method was deprecated in API level 5. cid value passed as in location parameter passed to constructor NeighboringCellInfo(int, String, int)
void setRssi(int rssi)
This method was deprecated in API level 5. initial rssi value passed as parameter to constructor NeighboringCellInfo(int, String, int)
String toString()
Returns a string containing a concise, human-readable description of this object.
void writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final int UNKNOWN_CID

Added in API level 3

Cell location is not available

Constant Value: -1 (0xffffffff)

public static final int UNKNOWN_RSSI

Added in API level 3

Signal strength is not available

Constant Value: 99 (0x00000063)

Fields

public static final Creator<NeighboringCellInfo> CREATOR

Added in API level 3

Public Constructors

public NeighboringCellInfo ()

Added in API level 3

This constructor was deprecated in API level 5.
by NeighboringCellInfo(int, String, int)

Empty constructor. Initializes the RSSI and CID. NeighboringCellInfo is one time shot for the neighboring cells based on the radio network type at that moment. Its constructor needs radio network type.

public NeighboringCellInfo (int rssi, int cid)

Added in API level 3

This constructor was deprecated in API level 5.
by NeighboringCellInfo(int, String, int)

Initialize the object from rssi and cid. NeighboringCellInfo is one time shot for the neighboring cells based on the radio network type at that moment. Its constructor needs radio network type.

public NeighboringCellInfo (int rssi, String location, int radioType)

Added in API level 7

public NeighboringCellInfo (Parcel in)

Added in API level 3

Initialize the object from a parcel.

Public Methods

public int describeContents ()

Added in API level 3

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
  • a bitmask indicating the set of special object types marshalled by the Parcelable.

public int getCid ()

Added in API level 3

Returns
  • cell id in GSM, 0xffff max legal value UNKNOWN_CID if in UMTS or CDMA or unknown

public int getLac ()

Added in API level 5

Returns
  • LAC in GSM, 0xffff max legal value UNKNOWN_CID if in UMTS or CMDA or unknown

public int getNetworkType ()

Added in API level 5

Returns

public int getPsc ()

Added in API level 5

Returns
  • Primary Scrambling Code in 9 bits format in UMTS, 0x1ff max value UNKNOWN_CID if in GSM or CMDA or unknown

public int getRssi ()

Added in API level 3

Returns
  • received signal strength or UNKNOWN_RSSI if unknown For GSM, it is in "asu" ranging from 0 to 31 (dBm = -113 + 2*asu) 0 means "-113 dBm or less" and 31 means "-51 dBm or greater" For UMTS, it is the Level index of CPICH RSCP defined in TS 25.125

public void setCid (int cid)

Added in API level 3

This method was deprecated in API level 5.
cid value passed as in location parameter passed to constructor NeighboringCellInfo(int, String, int)

Set the cell id. NeighboringCellInfo is a one time shot for the neighboring cells based on the radio network type at that moment. It shouldn't be changed after creation.

public void setRssi (int rssi)

Added in API level 3

This method was deprecated in API level 5.
initial rssi value passed as parameter to constructor NeighboringCellInfo(int, String, int)

Set the signal strength of the cell. NeighboringCellInfo is a one time shot for the neighboring cells based on the radio network type at that moment. It shouldn't be changed after creation.

public String toString ()

Added in API level 3

Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:

   getClass().getName() + '@' + Integer.toHexString(hashCode())

See Writing a useful toString method if you intend implementing your own toString method.

Returns
  • a printable representation of this object.

public void writeToParcel (Parcel dest, int flags)

Added in API level 3

Flatten this object in to a Parcel.

Parameters
dest The Parcel in which the object should be written.
flags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.