收藏
回答

蓝牙API搜不到设备

框架类型 API/组件名称 终端类型 操作系统 微信版本 基础库版本
小程序 蓝牙 客户端 Android 6.6.1 1.9.5

使用蓝牙API无法扫描到周边蓝牙设备,请问那里弄错了,或者漏了吗? 操作步骤如下

1. wx.openBluetoothAdapter

返回 {openBluetoothAdapter:ok}


2. wx.getBluetoothAdapterState

返回 {

            available: true,

           discovering: false,

            getBluetoothAdapterState: ok

       }


3. wx.startBluetoothDevicesDiscovery

返回 {

            available: true,

isDiscovering: true,

            startBluetoothDevicesDiscovery: ok

}


4.  wx.onBluetoothAdapterStateChange

返回 {

            available: true,

discovering: true

}


5. wx.getBluetoothDevices

返回 {

            getBluetoothDevices: ok,

            devices: []

}


6. wx.getBluetoothAdapterState

返回 {

            available: true,

discovering: false,

            getBluetoothAdapterState: ok

}



回答关注问题邀请回答
收藏
登录 后发表内容