在带有 createInsecureRfcommSocketToServiceRecord() API 的 Android 2.3.3 BluetoothChat 示例中,即使没有提供 PIN 码,仍会提示用户接受配对请求.
In the Android 2.3.3 BluetoothChat example with with createInsecureRfcommSocketToServiceRecord() API, users are still prompted to accept the pairing request, even though no PIN code is presented.
有没有办法在无需用户干预的情况下自动完成蓝牙配对请求?或者由于安全问题,这永远不可能?我已经在网上找了两天了,并没有真正找到多少,所以如果有人知道,请发帖.
Is there a way to automate Bluetooth pairing request without user intervention? Or is this never possible due to security concerns? I have been looking online for 2 days now and haven't really found much, so if anybody knows, please post.
谢谢!
推荐答案不是标准 API,不是:如果配对数据库中还没有 MAC 地址,总会有提示.有人告诉我,如果您的设备已 root 并且对蓝牙服务的 DBus 端点具有公共读/写访问权限,您可以解决这个问题,但我从未见过实际实现.
Not with the standard API, no: if the MAC address is not already in the pairing database there will always be the prompt. I'm told that if you have a device that has been rooted and have public read/write access to the bluetooth service's DBus endpoint you can work around that but I've never seen that actually implemented.
更多推荐
可以自动接受蓝牙配对吗?
发布评论