2014-03-14 21 views
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()); 

}

回答

0

下面是解Click Here

+0

PhoneStateIntentReceiver已經從Android SDK中刪除。我們不能使用給定的代碼示例。 – Venugopal

相關問題