是否有可能配对编程BluetoothDevice类的android? [英] Is it possible to pair BluetoothDevice programmatically android?

查看:111
本文介绍了是否有可能配对编程BluetoothDevice类的android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前使用的IAM获得与Android设备1.5.Whenever蓝牙配对编程backport.android.bluetooth2.jar文件失败,填充警告对话框,输入密钥,如果我给密钥,然后在我的日志IAM越来越错误以下

Currently Iam using backport.android.bluetooth2.jar file for bluetooth programming with Android 1.5.Whenever device pairing fails it populates alert dialog for passKey and if i give passkey then in my log iam getting below error

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设备,我意识到以编程方式给这个密钥,但我还没有发现在谷歌开源的this.But任何方法,我发现一个方法是在 BluetoothDevice.java 评论与@hide setPassKey(字符串地址,INT密钥) <$ C的$ C> backport.android.bluetooth2.jar 。这将不会出现在我的jar文件。如果任何方式是有配对无限设备,请给予答复尽快?

For successfully pair my BT device I always rebooting my tablet and manually pair the device with Settings options.So at last i realised to give this passKey programmatically but i haven't found any method for this.But in google opensource i found one method that is commented with @hide setPassKey(String Address,int passKey) in BluetoothDevice.java of backport.android.bluetooth2.jar .This will n't appear in my jar file.If any way is there for pairing the unbounded device please give reply ASAP?

推荐答案

在以下方法AndroidBluetoothAPI_0.3.jar文件可用I,E:对(地址) setPin( )为编程设置引脚和连接BT device.For发现信号强度的方法是在这个api.Below可用是code项目链接

In the AndroidBluetoothAPI_0.3.jar file following methods are available i,e: pair(address) and setPin() for setting the pin programmatically and connecting the BT device.For finding the signal strength method is available in this api.Below is the code project link

<一个href=\"http://$c$c.google.com/p/android-bluetooth/downloads/detail?name=AndroidBluetoothAPI_0.3.jar&can=2&q=\" rel=\"nofollow\">http://$c$c.google.com/p/android-bluetooth/downloads/detail?name=AndroidBluetoothAPI_0.3.jar&can=2&q=

这篇关于是否有可能配对编程BluetoothDevice类的android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆