# Print output for @column tags ?>
public
class
NeighboringCellInfo
extends Object
implements
Parcelable
java.lang.Object | |
↳ | android.telephony.NeighboringCellInfo |
This class is deprecated.
This class should not be used by any app targeting
Android Q
or higher. Instead callers should use
CellInfo
.
Represents the neighboring cell information, including Received Signal Strength and Cell ID location.
Constants | |
---|---|
int |
UNKNOWN_CID
Cell location is not available |
int |
UNKNOWN_RSSI
Signal strength is not available |
Inherited constants |
---|
Fields | |
---|---|
public
static
final
Creator<NeighboringCellInfo> |
CREATOR
|
Public constructors | |
---|---|
NeighboringCellInfo()
This constructor is deprecated.
by |
|
NeighboringCellInfo(int rssi, int cid)
This constructor is deprecated.
by |
|
NeighboringCellInfo(int rssi, String location, int radioType)
Initialize the object from rssi, location string, and radioType
radioType is one of following
|
|
NeighboringCellInfo(Parcel in)
Initialize the object from a parcel. |
Public methods | |
---|---|
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled 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
|
void
|
setRssi(int rssi)
This method is deprecated.
initial rssi value passed as parameter to constructor
|
String
|
toString()
Returns a string representation of the object. |
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |
---|---|
public static final int UNKNOWN_CID
Cell location is not available
Constant Value: -1 (0xffffffff)
public static final int UNKNOWN_RSSI
Signal strength is not available
Constant Value: 99 (0x00000063)
public NeighboringCellInfo ()
This constructor is deprecated.
by NeighboringCellInfo(int, java.lang.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)
This constructor is deprecated.
by NeighboringCellInfo(int, java.lang.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.
Parameters | |
---|---|
rssi |
int |
cid |
int |
public NeighboringCellInfo (int rssi, String location, int radioType)
Initialize the object from rssi, location string, and radioType
radioType is one of following
TelephonyManager.NETWORK_TYPE_GPRS
,
TelephonyManager.NETWORK_TYPE_EDGE
,
TelephonyManager.NETWORK_TYPE_UMTS
,
TelephonyManager.NETWORK_TYPE_HSDPA
,
TelephonyManager.NETWORK_TYPE_HSUPA
,
and TelephonyManager.NETWORK_TYPE_HSPA
.
Parameters | |
---|---|
rssi |
int |
location |
String |
radioType |
int |
public NeighboringCellInfo (Parcel in)
Initialize the object from a parcel.
Parameters | |
---|---|
in |
Parcel |
public int describeContents ()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of writeToParcel(android.os.Parcel, int)
,
the return value of this method must include the
CONTENTS_FILE_DESCRIPTOR
bit.
Returns | |
---|---|
int |
a bitmask indicating the set of special object types marshaled
by this Parcelable object instance.
Value is either 0 or CONTENTS_FILE_DESCRIPTOR |
public int getCid ()
Returns | |
---|---|
int |
cell id in GSM, 0xffff max legal value UNKNOWN_CID if in UMTS or CDMA or unknown |
public int getLac ()
Returns | |
---|---|
int |
LAC in GSM, 0xffff max legal value UNKNOWN_CID if in UMTS or CMDA or unknown |
public int getNetworkType ()
Returns | |
---|---|
int |
Radio network type while neighboring cell location is stored.
Return TelephonyManager.NETWORK_TYPE_UNKNOWN
means that the location information is unavailable.
Return TelephonyManager.NETWORK_TYPE_GPRS or
TelephonyManager.NETWORK_TYPE_EDGE
means that Neighboring Cell information is stored for GSM network, in
which NeighboringCellInfo.getLac and
NeighboringCellInfo.getCid should be
called to access location.
Return TelephonyManager.NETWORK_TYPE_UMTS ,
TelephonyManager.NETWORK_TYPE_HSDPA ,
TelephonyManager.NETWORK_TYPE_HSUPA ,
or TelephonyManager.NETWORK_TYPE_HSPA
means that Neighboring Cell information is stored for UMTS network, in
which NeighboringCellInfo.getPsc
should be called to access location. |
public int getPsc ()
Returns | |
---|---|
int |
Primary Scrambling Code in 9 bits format in UMTS, 0x1ff max value UNKNOWN_CID if in GSM or CMDA or unknown |
public int getRssi ()
Returns | |
---|---|
int |
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)
This method is deprecated.
cid value passed as in location parameter passed to constructor
NeighboringCellInfo(int, java.lang.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.
Parameters | |
---|---|
cid |
int |
public void setRssi (int rssi)
This method is deprecated.
initial rssi value passed as parameter to constructor
NeighboringCellInfo(int, java.lang.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.
Parameters | |
---|---|
rssi |
int |
public String toString ()
Returns a string representation of the object. In general, the
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
Returns | |
---|---|
String |
a string representation of the object. |
public void writeToParcel (Parcel dest, int flags)
Flatten this object in to a Parcel.
Parameters | |
---|---|
dest |
Parcel : The Parcel in which the object should be written. |
flags |
int : Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE .
Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |