【问题标题】:Android: Fetch all nearby cellular carriers and their signal strengthAndroid:获取附近的所有蜂窝运营商及其信号强度
【发布时间】:2016-05-28 19:27:36
【问题描述】:

我想以编程方式获取附近的所有蜂窝运营商及其在 Android 上的信号强度。
使用PhoneStateListener,我能够得到我目前注册的运营商的信号强度,但是我没有找到找到附近其他运营商信号强度的方法。
我怎样才能做到这一点?

【问题讨论】:

标签: android telephony


【解决方案1】:
Use this for getting cellular carrier name

// Get System TELEPHONY service reference
TelephonyManager telephonyManager = (TelephonyManager) getBaseContext()
      .getSystemService(Context.TELEPHONY_SERVICE);

// Get carrier name (Network Operator Name)
String carrierName = telephonyManager.getNetworkOperatorName();

For getting Signal Strength


TelephonyManager telephonyManager = (TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE);`

CellInfoGsm cellinfogsm = (CellInfoGsm)telephonyManager.getAllCellInfo().get(0);

CellSignalStrengthGsm cellSignalStrengthGsm = cellinfogsm.getCellSignalStrength();

cellSignalStrengthGsm.getDbm();

希望对你有帮助

【讨论】:

    猜你喜欢
    • 2012-05-14
    • 2011-06-24
    • 2011-03-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多