对于我的Android
应用程序,我需要获取当前的TX通道。我尝试使用TelephonyManager
,但找不到此方法。我需要另一个参数,我没有问题。例如SignalStrength:
class myPhoneStateListener extends PhoneStateListener {
public int signalStrengthValue;
public void onSignalStrengthsChanged(SignalStrength signalStrength) {
super.onSignalStrengthsChanged(signalStrength);
if (signalStrength.isGsm()) {
if (signalStrength.getGsmSignalStrength() != 99)
signalStrengthValue = signalStrength.getGsmSignalStrength() * 2 - 113;
else
signalStrengthValue = signalStrength.getGsmSignalStrength();
} else {
signalStrengthValue = signalStrength.getCdmaDbm();
}
Log.e("Signal Strength : ", Integer.toString(signalStrengthValue));
}
}
我可以为TX频道创建 PhoneStateListener 吗?
谢谢!