Android Marshmallow之后为什么需要位置权限才能进行Ble扫描 [英] Why Location permission are required for Ble scan in android Marshmallow onwards

查看:929
本文介绍了Android Marshmallow之后为什么需要位置权限才能进行Ble扫描的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用名为Marshmallow的Android的最新版本,开始低能耗蓝牙扫描需要位置组的许可。
由于以下权限之一是必需的:

With the latest release of Android called Marshmallow,Starting a Bluetooth Low Energy scan requires permission from Location group. As a result of that one of the following permissions are required:

ACCESS_COARSE_LOCATION ACCESS_FINE_LOCATION

为什么我们需要打开 GPS code> BLE scan?

Any reason why we need to switch on GPS for BLE scan?

推荐答案

BLE信标可用于获取位置信息无非BLE广播UUID数据和互联网连接(例如iBeacon,AltBeacon等)由于这是可能的,并且可以通过扫描获取数据,所以需要位置许可。实际上, ACCESS_COARSE_LOCATION 是获得 NetworkProvider 权限级别所需的级别。通过使用 ACCESS_FINE_LOCATION ,您可以获得 NetworkProvider 以及GPS。

BLE beacons can be used to get location information using nothing more than the BLE broadcast UUID data and an internet connection (e.g. iBeacon, AltBeacon etc.) Since this is possible and the data can be acquired via scan, a permission for location is required. In reality, ACCESS_COARSE_LOCATION is the required level in order to get NetworkProvider level of permission. By using, ACCESS_FINE_LOCATION you get NetworkProvider as well as GPS.

这篇关于Android Marshmallow之后为什么需要位置权限才能进行Ble扫描的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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