BluetoothLeScanner.startScan()需要在棉花糖新的权限? [英] BluetoothLeScanner.startScan() requires new permissions in Marshmallow?

查看:3145
本文介绍了BluetoothLeScanner.startScan()需要在棉花糖新的权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

随着Android 6.0版本(API 23),我注意到 BluetoothLeScanner.startScan()需要新的权限; ACCESS_COARSE_LOCATION 和/或 ACCESS_FINE_LOCATION 。任何人都可以请解释这背后的原因。为什么会蓝牙 ScanResult 要求位置的权限?

With the Android 6.0 release (API 23), I noticed that BluetoothLeScanner.startScan() requires new permissions; ACCESS_COARSE_LOCATION and/or ACCESS_FINE_LOCATION. Can anyone please explain the reasoning behind this. Why would a Bluetooth ScanResult require Location permissions?

在此更改的详细信息可以在这里找到:<一href=\"https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-hardware-id\"相对=nofollow>在Android 6.0的变化:进入硬件标识符

More information on this change can be found here: Android 6.0 Changes: Access to hardware identifer

感谢您的时间提前!

推荐答案

这可能是因为新BTLE航标技术,如苹果公司的iBeacon显示或谷歌自己的埃迪斯通规范。这些是用于微位服务的工具,并因此可以由应用程序被用来绘制出(相当precisely),你在哪里。考虑到粗,细位置的权限似乎是适当的。

It's likely due to new BTLE beacon technology such as Apple's iBeacon or Google's own Eddystone spec. These are tools used for microlocation services, and as a result can be used by the application to map out (quite precisely) where you are. Considering that, coarse and fine location permissions seem appropriate.

下面是来自谷歌的一些信息

下面是苹果的一些信息。

下面是AltBeacon一些信息。

这篇关于BluetoothLeScanner.startScan()需要在棉花糖新的权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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