当前位置: 首页>>代码示例>>Java>>正文


Java CellSignalStrengthWcdma.getAsuLevel方法代码示例

本文整理汇总了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;
}
 
开发者ID:gautamgitspace,项目名称:CellularNetworkMonitor,代码行数:46,代码来源:CellularDataRecorder.java

示例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());
	}
}
 
开发者ID:emdete,项目名称:tabulae,代码行数:11,代码来源:CellId.java

示例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());
	}
}
 
开发者ID:emdete,项目名称:Simplicissimus,代码行数:10,代码来源:CellId.java


注:本文中的android.telephony.CellSignalStrengthWcdma.getAsuLevel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。