如何在android中获取基站的位置和ID

时间:2014-03-14 09:31:41

标签: android

列出cellInfos =(List)this.telephonyManager.getAllCellInfo();

for(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());

}

1 个答案:

答案 0 :(得分:0)

以下是解决方案Click Here