startBLEScanSync
iOS 单端插件方法。调用 connectBLEDevice 连接蓝牙设备前需要先调用该方法开启扫描。
开启扫描同步方法
引入
import { startBLEScanSync } from '@ray-js/ray';
需引入
DeviceKit
,且在>=2.1.6
版本才可使用startBLEScan 的同步版本
stopBLEScan
iOS 单端插件方法。不需要连接设备时调用该方法关闭扫描。
关闭扫描
引入
import { stopBLEScan } from '@ray-js/ray';
需引入
DeviceKit
,且在>=2.1.6
版本才可使用
参数
Object object
属性 | 类型 | 默认值 | 必填 | 说明 |
---|---|---|---|---|
complete | function |
否 | 接口调用结束的回调函数(调用成功、失败都会执行) | |
success | function |
否 | 接口调用成功的回调函数 | |
fail | function |
否 | 接口调用失败的回调函数 |
stopBLEScanSync
iOS 单端插件方法。不需要连接设备时调用该方法关闭扫描。
关闭扫描同步方法
引入
import { stopBLEScanSync } from '@ray-js/ray';
需引入
DeviceKit
,且在>=2.1.6
版本才可使用stopBLEScan 的同步版本
👉