Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/182.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 安卓:获取附近所有的手机运营商及其信号强度_Android_Telephony - Fatal编程技术网

Android 安卓:获取附近所有的手机运营商及其信号强度

Android 安卓:获取附近所有的手机运营商及其信号强度,android,telephony,Android,Telephony,我想通过编程方式在Android上获取附近所有的手机运营商及其信号强度。 使用PhoneStateListener,我能够获得我当前注册的载波的信号强度,但我没有找到找到附近其他载波的信号强度的方法。 我怎样才能做到这一点 Use this for getting cellular carrier name // Get System TELEPHONY service reference TelephonyManager telephonyManager = (TelephonyManage

我想通过编程方式在Android上获取附近所有的手机运营商及其信号强度。
使用
PhoneStateListener
,我能够获得我当前注册的载波的信号强度,但我没有找到找到附近其他载波的信号强度的方法。
我怎样才能做到这一点

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();
希望对您有所帮助

dup: