当设备配对失败时,它会为passKey填充警告对话框,如果我给了密钥,那么在我的日志中,Iam会得到下面的错误
07-21 12:25:52.419: WARN/BluetoothDeviceService(948): setPin(00:0E:6D:BA:89:F3) called but no native data available, ignoring. Maybe the PasskeyAgent Request was cancelled by the remote device or by bluez.为了成功配对我的BT设备,我总是重新启动我的平板电脑和手动配对的设备与设置options.So在最后,我意识到以编程方式给这个passKey,但我还没有找到任何方法的this.But在谷歌开源我发现一个方法是@隐藏setPassKey(String Address,int passKey)在BluetoothDevice.java的backport.android.bluetooth2.jar .This将不会出现在我的jar file.If有任何方式配对无限设备请尽快回复?
发布于 2010-07-26 14:22:39
在AndroidBluetoothAPI_0.3.jar文件中有以下方法可用:pair(address)和setPin()用于以编程方式设置引脚和连接BT device.For查找信号强度方法在此api.Below中可用是代码项目链接
http://code.google.com/p/android-bluetooth/downloads/detail?name=AndroidBluetoothAPI_0.3.jar&can=2&q=
https://stackoverflow.com/questions/3298199
复制相似问题