转http://blog.youkuaiyun.com/wzsong123/article/details/6741973
public List<NeighboringCellInfo> getNeighboringCellInfo ()
Returns the neighboring cell information of the device.
Returns
- List of NeighboringCellInfo or null if info unavailable.
Requires Permission: (@link Android.Manifest.permission#ACCESS_COARSE_UPDATES}
获取当前连接的基站信息的到处都是,下面只写我获取周围基站的过程:
tm = (TelephonyManager) this
.getSystemService(Context.TELEPHONY_SERVICE);
List<NeighboringCellInfo> list = tm.getNeighboringCellInfo();
if (!list.isEmpty()) {
for (NeighboringCellInfo info : list) {
int cid = info.getCid();
// 获取邻居小区LAC,LAC:
// 位置区域码。为了确定移动台的位置,每个GSM/PLMN的覆盖区都被划分成许多位置区,LAC则用于标识不同的位置区。
int lac = info.getLac();
// 获取邻居小区信号强度
int ss = -131 + 2 * info.getRssi();
}
}
不出意外的话,以上就OK了。
本文介绍了一种通过Android系统的TelephonyManager获取周边基站信息的方法,并展示了如何读取邻居小区的CID、LAC及信号强度。
3060

被折叠的 条评论
为什么被折叠?



