我们正在使用 DiscoveredPrinterBluetooth
来保持发现的打印机,ZebraPrinterConnection
和 ZebraPrinter
将数据发送到打印机。在较旧的 android 版本上一切正常,但假设 4.0 不工作,找到打印机但一直显示插入针屏幕。在日志中获取错误:
V/BluetoothSocket.cpp(5371): ...connect(96, RFCOMM) = 111 (errno 111)
如我所见,较新版本存在问题,请查看 Bluetooth pairing without user confirmation 但我不知道如何解决我的情况?有任何想法吗?谢谢
最佳答案
The 2.0 version of the Zebra SDK有一个不安全的蓝牙连接的实现。
检查新 SDK 中的 BluetoothConnectionInsecure
。如果您想要不安全的 BT 连接,可以使用它代替 BluetoothConnection
...
关于Android 斑马纹不适用于较新版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16294440/