Most visited

Recently visited

Added in API level 3

NeighboringCellInfo

public class NeighboringCellInfo
extends Object implements Parcelable

java.lang.Object
   ↳ android.telephony.NeighboringCellInfo


表示邻近小区信息,包括接收信号强度和小区ID位置。

Summary

Constants

int UNKNOWN_CID

小区位置不可用

int UNKNOWN_RSSI

信号强度不可用

Inherited constants

From interface android.os.Parcelable

Fields

public static final Creator<NeighboringCellInfo> CREATOR

Public constructors

NeighboringCellInfo()

此构造函数在API级别5中被弃用,达到NeighboringCellInfo(int, String, int)

NeighboringCellInfo(int rssi, int cid)

此构造函数在API级别5中被弃用,由NeighboringCellInfo(int, String, int)

NeighboringCellInfo(int rssi, String location, int radioType)

初始化从RSSI,位置字符串对象,无线电电传打字机无线电电传打字机是下列之一 TelephonyManager.NETWORK_TYPE_GPRSTelephonyManager.NETWORK_TYPE_EDGETelephonyManager.NETWORK_TYPE_UMTSTelephonyManager.NETWORK_TYPE_HSDPATelephonyManager.NETWORK_TYPE_HSUPA ,和 TelephonyManager.NETWORK_TYPE_HSPA

NeighboringCellInfo(Parcel in)

从宗地初始化对象。

Public methods

int describeContents()

描述此Parcelable实例的封送表示中包含的特殊对象的种类。

int getCid()
int getLac()
int getNetworkType()
int getPsc()
int getRssi()
void setCid(int cid)

此方法在API级别5中已被弃用。传递给构造函数NeighboringCellInfo(int, String, int)位置参数中传递的cid值

void setRssi(int rssi)

此方法在API级别5中已弃用。初始rssi值作为参数传递给构造函数NeighboringCellInfo(int, String, int)

String toString()

返回对象的字符串表示形式。

void writeToParcel(Parcel dest, int flags)

将此对象平铺到一个包裹中。

Inherited methods

From class java.lang.Object
From interface android.os.Parcelable

Constants

UNKNOWN_CID

Added in API level 3
int UNKNOWN_CID

小区位置不可用

常量值:-1(0xffffffff)

UNKNOWN_RSSI

Added in API level 3
int UNKNOWN_RSSI

信号强度不可用

常量值:99(0x00000063)

Fields

CREATOR

Added in API level 3
Creator<NeighboringCellInfo> CREATOR

Public constructors

NeighboringCellInfo

Added in API level 3
NeighboringCellInfo ()

此构造函数在API级别5中已被弃用。
通过NeighboringCellInfo(int, String, int)

空构造函数。 初始化RSSI和CID。 NeighboringCellInfo是当时基于无线电网络类型的相邻小区的一次拍摄。 它的构造函数需要无线网络类型。

NeighboringCellInfo

Added in API level 3
NeighboringCellInfo (int rssi, 
                int cid)

此构造函数在API级别5中已被弃用。
NeighboringCellInfo(int, String, int)

从rssi和cid初始化对象。 NeighboringCellInfo是当时基于无线电网络类型的相邻小区的一次拍摄。 它的构造函数需要无线网络类型。

Parameters
rssi int
cid int

NeighboringCellInfo

Added in API level 7
NeighboringCellInfo (int rssi, 
                String location, 
                int radioType)

初始化从RSSI,位置字符串对象,无线电电传打字机无线电电传打字机是下列之一 TelephonyManager.NETWORK_TYPE_GPRSTelephonyManager.NETWORK_TYPE_EDGETelephonyManager.NETWORK_TYPE_UMTSTelephonyManager.NETWORK_TYPE_HSDPATelephonyManager.NETWORK_TYPE_HSUPA ,和 TelephonyManager.NETWORK_TYPE_HSPA

Parameters
rssi int
location String
radioType int

NeighboringCellInfo

Added in API level 3
NeighboringCellInfo (Parcel in)

从宗地初始化对象。

Parameters
in Parcel

Public methods

describeContents

Added in API level 3
int describeContents ()

描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.

getCid

Added in API level 3
int getCid ()

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

getLac

Added in API level 5
int getLac ()

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

getNetworkType

Added in API level 5
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.

getPsc

Added in API level 5
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

getRssi

Added in API level 3
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

setCid

Added in API level 3
void setCid (int cid)

此方法在API级别5中已被弃用。
传递给构造函数NeighboringCellInfo(int, String, int)位置参数中传递的cid值

设置单元ID。 NeighboringCellInfo是当时基于无线电网络类型的相邻小区的一次性拍摄。 创建后不应更改。

Parameters
cid int

setRssi

Added in API level 3
void setRssi (int rssi)

此方法在API级别5中已被弃用。
初始rssi值作为参数传递给构造函数NeighboringCellInfo(int, String, int)

设置单元的信号强度。 NeighboringCellInfo是当时基于无线电网络类型的相邻小区的一次性拍摄。 创建后不应更改。

Parameters
rssi int

toString

Added in API level 3
String toString ()

返回对象的字符串表示形式。 一般来说, toString方法会返回一个“文本表示”该对象的字符串。 结果应该是一个简洁但内容丰富的表述,对于一个人来说很容易阅读。 建议所有子类重写此方法。

ObjecttoString方法返回一个字符串,其中包含对象为实例的类的名称,符号字符“ @ ”以及对象的哈希代码的无符号十六进制表示形式。 换句话说,这个方法返回一个字符串,其值等于:

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

Returns
String a string representation of the object.

writeToParcel

Added in API level 3
void writeToParcel (Parcel dest, 
                int flags)

将此对象平铺到一个包裹中。

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.

Hooray!