Android中Telephony学习笔记(5)-CDMA/GSM/LTE/WCDMA

时间:2022-12-26 13:23:09

CellInfo


抽象类,继承自基类Object,继承Parcelable接口代表在一个时间点上接收的信元信号,实现类有CellInfoCdma,CellInfoGsm,CellInfoLte,CellInfoWcdma.分别代表目前世界上的主流通信技术CDMA/GSM/LTE/WCDMA.


FIELDS


public static final Creator<CellInfo> CREATOR:所有继承Parcelable接口的类都有该字段


Methods


public long getTimeStamp()


计算信号从开机开始到现在的时间,单位毫微秒。


public boolean isRegistered()



信号是否在移动网络中注册


Cellinfo的实现类之CellInfoGsm


CellInfoGsm


GSM通信技术的信号信息


public CellIdentityGsm getCellIdentity()


信号标识对象


public CellSignalStrengthGsm getCellSignalStrength ()


信号强度对象


Cellinfo的实现类之CellInfoCdma


CellInfoCdma


CDMA通信技术的信号信息,方法同CellInfoCdma


Cellinfo的实现类之CellInfoWcdma


CellInfoWcdma


WCDMA通信技术的信号信息,方法同CellInfoCdma


Cellinfo的实现类之CellInfoLte


CellInfoLte


LTE通信技术的信号信息,方法同CellInfoCdma


===================================================================================================================================

下面各类定义了一些信号的各种标识信息


CellIndetityGsm


唯一标识一个GSM通信技术里的信号元.


public int getCid()


得到信号16位的唯一标识。


public int getLac()


16位的位置区域码


public int getMcc()


3位数的移动国家码


public int getMnc()


2-3位数的移动网络码


public int getPsc()


gsm没定义该方法


CellIndetityCdma


唯一标识一个CDMA通信技术里的信号元


public int getBasestationId()


基站ID号


public int getLatitude()


经度


public int getLongitude()


纬度


public int getNetworkId()


网络id号


public int getSystemId()


系统ID号


CellIndetityWcdma


唯一标识一个WCDMA通信技术里的信号元


public int getCid()


得到信号16位的唯一标识。


public int getLac()


16位的位置区域码


public int getMcc()


3位的移动国家码


public int getMnc()


2-3位的移动网络码


public int getPsc()


9位的UMTS初级加扰码


CellIndetityLte


唯一标识一个LTE通信技术里的信号元


public int getCi()


28位的信号标识码


public int getMcc()


3位数的移动国家码


public int getMnc()


2-3位数的移动网络码


public int getPci()


物理信号id0..503


public int getTac()


16位的跟踪区域代码


===================================================================================================================================

CellLocation


抽象类,继承自基类Object,表示设备的位置。


public static CellLocation getEmpty ()


获得CellLocation对象,单例模式


public static void requestLocationUpdate()


更新位置信息