public
class
NeighboringCellInfo
extends Object
implements
Parcelable
java.lang.Object | |
↳ | android.telephony.NeighboringCellInfo |
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 |
---|
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 rssi, int cid)
This constructor was deprecated
in API level 5.
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 was deprecated
in API level 5.
cid value passed as in location parameter passed to constructor
|
void
|
setRssi(int rssi)
This method was deprecated
in API level 5.
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 | |
---|---|
From
class
java.lang.Object
| |
From
interface
android.os.Parcelable
|
int UNKNOWN_CID
Cell location is not available
Constant Value: -1 (0xffffffff)
int UNKNOWN_RSSI
Signal strength is not available
Constant Value: 99 (0x00000063)
NeighboringCellInfo ()
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.
NeighboringCellInfo (int rssi, int cid)
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.
Parameters | |
---|---|
rssi |
int
|
cid |
int
|
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
|
NeighboringCellInfo (Parcel in)
Initialize the object from a parcel.
Parameters | |
---|---|
in |
Parcel
|
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(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. |
int getCid ()
Returns | |
---|---|
int |
cell id in GSM, 0xffff max legal value UNKNOWN_CID if in UMTS or CDMA or unknown |
int getLac ()
Returns | |
---|---|
int |
LAC in GSM, 0xffff max legal value UNKNOWN_CID if in UMTS or CMDA or unknown |
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.
|
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 |
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 |
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)
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
|
void setRssi (int rssi)
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.
Parameters | |
---|---|
rssi |
int
|
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. |
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_WRITE_RETURN_VALUE .
|