在Android中,我嘗試獲取鄰居小區信息。我用下面的代碼鄰居小區對於CID和LAC有-1 -1
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
List<NeighboringCellInfo> neighborCells = telephonyManager.getNeighboringCellInfo();
if (neighborCells == null) {
Log.d("cells", "Neighbor cells is null");
} else {
for (NeighboringCellInfo cell : neighborCells) {
Log.d("cells", cell.getCid()+"-"+cell.getLac()+" "+(-113+cell.getRssi()*2)+"dB");
}
}
使用logcat中,我得到以下輸出
D/cells (7668): Neighbor cell: -1--1 -81dB
D/cells (7668): Neighbor cell: -1--1 -113dB
D/cells (7668): Neighbor cell: -1--1 -113dB
你知道爲什麼嗎?它與硬件有關嗎?與另一個電話,我總是得到「相鄰小區爲空」
謝謝
謝謝,但我使用的是GSM手機 – 2012-02-22 09:31:33