安卓:NeighboringCellInfo [英] Android : NeighboringCellInfo

查看:143
本文介绍了安卓:NeighboringCellInfo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android API NeighboringCellInfo(),我想知道这个函数返回所有相邻小区? 而结果之一就是,我们的设备连接当前单元格?

NeighboringCellInfo() on Android API, I want to know this function return all neighbor cell? And one of result is current cell which our device connected?

太感谢了。

推荐答案

是的,它应该。

不过,我从来没有发现它做了一个装置。请报告回到这里,如果你发现做报告至少一个相邻小区任何GSM设备与任何Android操作系统版本。谢谢!

But I never found a device where it did. Please report back here if you find any GSM device with any Android OS Version that does report at least one neighboring cell. Thank you!

您应该可以使用下面的code,让他们:

You should be able to use the following code to get them:

TelephonyManager tm = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE);
List<NeighboringCellInfo> neighbours = tm.getNeighboringCellInfo();

您需要在您的Andr​​oidManidfest.xml以下权限:

You need the following permission in your AndroidManidfest.xml:

<uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES"/>

因为我从来没有看到任何结果列表中的我不知道当前连接的小区是否包括在内。我猜想这是不是。

Since I never saw any result in the list I do not know whether the currently connected cell is included. I would guess it is not.

这篇关于安卓:NeighboringCellInfo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆