android如何检测信标的接近位置

时间:2017-09-05 09:07:32

标签: bluetooth-lowenergy beacon android-studio-2.3 estimote

我正在使用android studio 2.3.2开发一个用于检测范围内的estimote信标的应用程序。

我只是想说清楚并理解,实际上为了使用Android应用程序检测并获得estimote信标的接近位置,我们只需要在android studio中包含Bluetooth Low Energy(BLE)的许可。运行应用程序进行测试。如果我错了,请指导并纠正我。

1 个答案:

答案 0 :(得分:0)

您必须同时获取BLUETOOTH_ADMIN和COARSE_LOCATION权限才能扫描Android 6+上的信标。后一种权限被认为是危险的,因此除了向AndroidManifest.xml添加权限外,它还需要在应用程序的运行时提示用户。

您可以在此处详细了解如何提示位置权限:

http://altbeacon.github.io/android-beacon-library/requesting_permission.html