Bluetooth插件(连接外设)

提供一些蓝牙基础操作功能,包括扫描设备、链接设备、发送通知、读和写等操作

[!WARNING]

  • 插件的所有接口在 deviceready 事件后生效;

API列表

API 说明
navigator.bluetooth.scan 扫描设备
navigator.bluetooth.stopScan 停止扫描
navigator.bluetooth.connect 连接设备
navigator.bluetooth.disconnect 断开连接
navigator.bluetooth.update 蓝牙模块升级
navigator.bluetooth.write 写入数据,带响应
navigator.bluetooth.read 读数据
navigator.bluetooth.writeWithoutResponse 写入数据,不带响应
navigator.bluetooth.startNotification 开启通道
navigator.bluetooth.stopNotification 关闭通道
navigator.bluetooth.isConnected 判断外设是否连接

results matching ""

    No results matching ""