0
列表cellInfos =(List)this.telephonyManager.getAllCellInfo();如何獲取android中基站的位置和ID
爲(CellInfo cellInfo:cellInfos) { CellInfoGsm cellInfoGsm =(CellInfoGsm)cellInfo;
CellIdentityGsm cellIdentity = cellInfoGsm.getCellIdentity();
CellSignalStrengthGsm cellSignalStrengthGsm = cellInfoGsm.getCellSignalStrength();
Log.d("cell", "registered: "+cellInfoGsm.isRegistered());
Log.d("cell", cellIdentity.toString());
Log.d("cell", cellSignalStrengthGsm.toString());
}
PhoneStateIntentReceiver已經從Android SDK中刪除。我們不能使用給定的代碼示例。 – Venugopal