【发布时间】:2023-01-06 22:04:41
【问题描述】:
我需要蓝牙串行插件的帮助,当我检查 bluetooth.isEnable 时,它返回 Ok 或 is Disabled,这是正确的。如果我尝试使用任何其他功能,例如 List 或 discoverUnpaired 我会收到以下错误错误“需要 android.permission.BLUETOOTH_SCAN 许可 AttributionSource { uid = 10467, packageName = com.fire.service.app, attributionTag = null, token = android.os.BinderProxy@a208f16, next = null }:开始发现。”
非常感谢您的协助。
下面是我的环境 离子: 离子 CLI:6.20.1 离子框架:@ionic/angular 6.2.2 @angular-devkit/build-angular:13.0.4 @angular-devkit/原理图:13.0.4 @角/cli:13.0.4 @离子/角度工具包:5.0.3
科尔多瓦: 科尔多瓦 CLI:11.0.0 科尔多瓦平台:android 10.1.2 Cordova 插件:cordova-plugin-ionic-keyboard 2.2.0、cordova-plugin-ionic-webview 5.0.0(和其他 14 个插件)
效用: 科尔多瓦水库:0.15.4 本机运行(可用更新:1.7.1):1.5.0
系统: NodeJS:v14.15.4 (C:\Program Files\nodejs\node.exe) npm:6.14.10 操作系统:Windows 10
【问题讨论】:
-
和我一样。。还没有解决办法
-
cordova-plugin-bluetooth-serial 需要更新 Android 12 的权限。github.com/don/BluetoothSerial/issues/454 同时您可以使用 github.com/brandomcombr/BluetoothSerial 上的 fork