我正在尝试找出任何方法来检索诸如BER和CIR的质量参数。我在Google和Android Developer网站上唯一能找到的就是getGsmBitErrorRate(),但它似乎一直显示-1。那么有没有其他方法可以获取质量参数呢?还是我做错了什么?
最佳答案
这对您有用吗?
TelephonyManager SignalManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
PhoneStateListener signalListener = new PhoneStateListener() {
public void onCallForwardingIndicatorChanged(boolean cfi) {
}
public void onCallStateChanged(int state, String incomingNumber) {
}
public void onCellLocationChanged(CellLocation location) {
}
public void onDataActivity(int direction) {
}
public void onDataConnectionStateChanged(int state) {
}
public void onDataConnectionStateChanged(int state, int networkType) {
}
public void onMessageWaitingIndicatorChanged(boolean mwi) {
}
public void onServiceStateChanged(ServiceState serviceState) {
}
public void onSignalStrengthsChanged(SignalStrength signalStrength) {
super.onSignalStrengthsChanged(signalStrength);
Log.e("onSignalStrengthsChanged: ", "GSM Cinr = "
+ signalStrength.getGsmSignalStrength());
}
};
SignalManager.listen(signalListener,
PhoneStateListener.LISTEN_SIGNAL_STRENGTH);
关于java - 如何在Android上检索GSM信号质量参数?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/4172558/