启用使用Nexus 5的设备监控到Android 6.0的灯塔 [英] Enable to monitor beacon on android 6.0 using nexus 5 device

查看:274
本文介绍了启用使用Nexus 5的设备监控到Android 6.0的灯塔的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我问一个跟进的问题我的previously问的问题 - >的http://stackoverflow.com/questions/33607410/background-monitoring-of-eddystone-beacon-using-altbeacon-library-on-android-pla/33613116?noredirect=1#comment55139316_33613116.

I am asking a follow up question to my previously asked question -> http://stackoverflow.com/questions/33607410/background-monitoring-of-eddystone-beacon-using-altbeacon-library-on-android-pla/33613116?noredirect=1#comment55139316_33613116.

我在哪里能够成功检测无论是在前台和后台标,直到我发现了同样的code无法检测到信标,当我尝试的Nexus 5设备上运行它运行Android 6.0。
任何人都可以提供一个解释为什么发生这种情况?谢谢你。

Where i was able to successfully detect beacons both in the foreground and background until I found out that the same code was unable to detect the beacon when i try to run it on nexus 5 device running android 6.0. Can anyone provide a explanation to why this is happening? Thanks.

推荐答案

到Android 6.0的规定,以两个新要求的应用程序,以检测BLE信标:

Android 6.0 imposes two new requirements in order for apps to detect BLE Beacons:


  1. 位置服务必须在设置打开。设置 - >位置 - >打开。特定模式可以是准确度高或设备保存。这是一个似乎被推广到所有的固件从谷歌建立了一个新的要求。如果没有这个的,BLE的扫描发现没有任何设备。

  1. Location Services must be turned on in settings. Settings -> Location -> On. The specific mode may be either "High Accuracy" or "Device Saving". This is a new requirement that appears to be being rolled out to all firmware builds from Google. Without this on, BLE scans discover no devices.

的应用程序必须给予运行权限。您必须code你的应用程序present这些权限要求用户之一。如果不批,应用​​程序将无法检测到BLE信标。

The app must be given runtime permissions by the user to ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION. You must code your app to present one of these permission requests to the user. If not granted, the app will not be able to detect BLE Beacons.

此过程的详细解释是在我的博客张贴在这里:的是灯塔准备应用在Android 6.0?

A detailed explanation of this process is in my blog post here: Is Your Beacon App Ready For Android 6.0?

这篇关于启用使用Nexus 5的设备监控到Android 6.0的灯塔的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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