可以使用@ohos.bluetooth.baseProfile模块下的getConnectionState方法查询设备连接状态。官方文档地址如下:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-bluetooth-baseprofile-V5\#baseprofilegetconnectionstate
可以使用@ohos.bluetooth.baseProfile模块下的getConnectionState方法查询设备连接状态。
官方文档地址如下:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-bluetooth-baseprofile-V5\#baseprofilegetconnectionstate