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 is deprecated. by NeighboringCellInfo(int, String, int)
NeighboringCellInfo(int rssi, int cid)
This constructor is deprecated. 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 is deprecated. cid value passed as in location parameter passed to constructor NeighboringCellInfo(int, String, int)
void setRssi(int rssi)
This method is deprecated. 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

Since: API Level 3

Cell location is not available

Constant Value: -1 (0xffffffff)

public static final int UNKNOWN_RSSI

Since: API Level 3

Signal strength is not available

Constant Value: 99 (0x00000063)

Fields

public static final Creator<NeighboringCellInfo> CREATOR

Since: API Level 3

Public Constructors

public NeighboringCellInfo ()

Since: API Level 3

This constructor is deprecated.
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)

Since: API Level 3

This constructor is deprecated.
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)

Since: API Level 7

public NeighboringCellInfo (Parcel in)

Since: API Level 3

Initialize the object from a parcel.

Public Methods

public int describeContents ()

Since: 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 ()

Since: API Level 3

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

public int getLac ()

Since: API Level 5

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

public int getNetworkType ()

Since: API Level 5

Returns

public int getPsc ()

Since: 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 ()

Since: 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)

Since: API Level 3

This method is deprecated.
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)

Since: API Level 3

This method is deprecated.
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 ()

Since: 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)

Since: 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.