Is it possible to connect BluetoothDevice programmatically to Android?

I am currently using the backport.android.bluetooth2.jar file for bluetooth programming with Android 1.5. If the device fails to connect, it fills out a warning dialog for passKey, and if I give passkey, then in my iam log it gets below the 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.

For a successful pair of my BT device, I always restart the tablet and manually connect the device with the settings. So finally, I figured out to give this passKey programmatically, but I did not find any method for this. But in google opensource I found one method that is commented using @hide setPassKey(String Address,int passKey)in BluetoothDevice.javafrom backport.android.bluetooth2.jar. This will not appear in my jar file. If any way exists to pair an unlimited device, please reply as soon as possible?

+3
source share
1 answer

AndroidBluetoothAPI_0.3.jar : i, e: () setPin() BT device.For api.Bowow

http://code.google.com/p/android-bluetooth/downloads/detail?name=AndroidBluetoothAPI_0.3.jar&can=2&q=

+2

Source: https://habr.com/ru/post/1755713/


All Articles