一、 iBeacon介绍
iBeacon是苹果在2013年WWDC上推出一项基于蓝牙4.0(Bluetooth LE | BLE | Bluetooth Smart)的精准微定位技术,在iPhone 4S后支持。当你的手持设备靠近一个Beacon基站时,设备就能够感应到Beacon信号,范围可以从几毫米到50米。因为是一种定位技术,苹果将iBeacon相关的接口放到了 CoreLocation.framework。Google在Android 4.3及后续版本支持了该功能,只要满足iBeacon技术标准即可。iBeacon底层的技术使用的使用BLE(Bluetooth Low Energy)。
二、技术文档
参考:lBeacon API
三、代码实现
//开始搜索蓝牙设备
startDiscoverBluetooth() {
let that = this;
//蓝牙初始化
uni.openBluetoothAdapter({
success(res