目录

closeBLEConnection:与手机蓝牙适配器断开连接

接口原型

public String closeBLEConnection(String deviceId)

方法描述:通过指定的设备UUID断开与手机蓝牙适配器的连接。

请求参数

表1 请求参数

参数名称

参数类型

参数描述

可选选项

deviceId

String

蓝牙设备ID,通过接口getDeviceId()获取。

M

请求示例:
function() {
       let self = this;
       self.deviceId = window.hilink.getDeviceId();
       this.log.info("deviceId: " + self.deviceId);
       // 断开蓝牙连接
       window.hilink.closeBLEConnection(self.deviceId);
}

响应参数

表2 响应参数

参数名称

参数类型

参数描述

可选选项

retCode

Number

错误码:0, 90001, 90010。

M