基础库 1.1.0 开始支持,低版本需做兼容处理
关闭蓝牙模块,使其进入未初始化状态。调用该方法将断开所有已建立的链接并释放系统资源。建议在使用小程序蓝牙流程后调用,与wx.openBluetoothAdapter成对调用。
OBJECT参数说明:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| success | Function | 是 | 成功则返回成功关闭模块信息 |
| fail | Function | 否 | 接口调用失败的回调函数 |
| complete | Function | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
示例代码:
wx.closeBluetoothAdapter({
success: function (res) {
console.log(res)
}
})
