m***@163.com
m***@163.com
  • 发布:2023-08-30 17:49
  • 更新:2023-08-30 17:49
  • 阅读:309

【报Bug】二次开启扫描蓝牙之后, onBluetoothDeviceFound 回调不会触发,过一会时间重新打开又恢复

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 22621.2134

HBuilderX类型: 正式

HBuilderX版本号: 3.8.12

手机系统: Android

手机系统版本号: Android 13

手机厂商: OPPO

手机机型: Reno 8 Pro+

页面类型: vue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:

运行这一套流程:

  1. uni.openBluetoothAdapter
  2. uni.getBluetoothAdapterState
  3. uni.startBluetoothDevicesDiscovery
  4. uni.onBluetoothDeviceFound
  5. uni.stopBluetoothDevicesDiscovery
  6. uni.closeBluetoothAdapter

预期结果:

uni.onBluetoothDeviceFound 正常回调设备结果

实际结果:

uni.onBluetoothDeviceFound 回调无法触发,无任何设备返回

bug描述:

通过这一套流程之后,第二次运行这套流程 uni.onBluetoothDeviceFound 不会再触发回调。等待一段时间后又恢复:

  1. uni.openBluetoothAdapter
  2. uni.getBluetoothAdapterState
  3. uni.startBluetoothDevicesDiscovery
  4. uni.onBluetoothDeviceFound
  5. uni.stopBluetoothDevicesDiscovery
  6. uni.closeBluetoothAdapter
2023-08-30 17:49 负责人:DCloud_App_Array 分享
已邀请:

要回复问题请先登录注册