本文整理汇总了Java中android.telephony.CellSignalStrengthWcdma.getAsuLevel方法的典型用法代码示例。如果您正苦于以下问题:Java CellSignalStrengthWcdma.getAsuLevel方法的具体用法?Java CellSignalStrengthWcdma.getAsuLevel怎么用?Java CellSignalStrengthWcdma.getAsuLevel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.telephony.CellSignalStrengthWcdma
的用法示例。
在下文中一共展示了CellSignalStrengthWcdma.getAsuLevel方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCellularInfo
import android.telephony.CellSignalStrengthWcdma; //导入方法依赖的package包/类
public String getCellularInfo(TelephonyManager telephonyManager)
{
String cellularInfo = "";
String log = "";
if(telephonyManager.getAllCellInfo()==null) {
Log.v(TAG, "getAllCellInfo returned null");
}
else {
for (final CellInfo info : telephonyManager.getAllCellInfo()) {
if (info instanceof CellInfoGsm) {
log += "[email protected]";
CellIdentityGsm gsm_cell = ((CellInfoGsm) info).getCellIdentity();
log += gsm_cell.getCid() + "#" + gsm_cell.getLac() + "#" + gsm_cell.getMcc() + "#" + gsm_cell.getMnc() + "_";
final CellSignalStrengthGsm gsm = ((CellInfoGsm) info).getCellSignalStrength();
log += gsm.getDbm() + "#" + gsm.getLevel()+"#"+gsm.getAsuLevel()+":";
} else if (info instanceof CellInfoCdma) {
log += "[email protected]";
CellIdentityCdma cdma_cell = ((CellInfoCdma) info).getCellIdentity();
log += cdma_cell.getBasestationId() + "#" + cdma_cell.getNetworkId() + "#" + cdma_cell.getSystemId() + "#" + cdma_cell.getSystemId() + "_";
final CellSignalStrengthCdma cdma = ((CellInfoCdma) info).getCellSignalStrength();
log += cdma.getDbm() + "#" + cdma.getLevel()+"#"+cdma.getAsuLevel()+":";
} else if (info instanceof CellInfoLte) {
log += "[email protected]";
CellIdentityLte lte_cell = ((CellInfoLte) info).getCellIdentity();
log += lte_cell.getCi() + "#" + lte_cell.getPci() + "#" + lte_cell.getMcc() + "#" + lte_cell.getMnc() + "_";
final CellSignalStrengthLte lte = ((CellInfoLte) info).getCellSignalStrength();
log += lte.getDbm() + "#" + lte.getLevel()+"#"+lte.getAsuLevel()+":";
} else if (info instanceof CellInfoWcdma) {
log += "[email protected]";
CellIdentityWcdma wcdma_cell = ((CellInfoWcdma) info).getCellIdentity();
log += wcdma_cell.getCid() + "#" + wcdma_cell.getLac() + "#" + wcdma_cell.getMcc() + "#" + wcdma_cell.getMnc() + "_";
final CellSignalStrengthWcdma wcdma = ((CellInfoWcdma) info).getCellSignalStrength();
log += wcdma.getDbm() + "#" + wcdma.getLevel()+"#"+wcdma.getAsuLevel()+":";
} else {
Log.v(TAG, "Unknown Network Type");
}
}
}
cellularInfo = log;
return cellularInfo;
}
示例2: fill
import android.telephony.CellSignalStrengthWcdma; //导入方法依赖的package包/类
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
public static void fill(TheDictionary map, CellSignalStrengthWcdma value) throws Exception {
if (value != null) {
int i;
i = value.getAsuLevel();
if (i != 99) map.put("asu_level", i);
map.put("dbm", value.getDbm());
map.put("level", value.getLevel());
}
}
示例3: fill
import android.telephony.CellSignalStrengthWcdma; //导入方法依赖的package包/类
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
public static void fill(TheDictionary map, CellSignalStrengthWcdma value) throws Exception {
if (value != null) {
int i;
i = value.getAsuLevel(); if (i != 99) map.put("asu_level", i);
map.put("dbm", value.getDbm());
map.put("level", value.getLevel());
}
}