What I want to do :
I'm developping an Android specific app where I must pair a device automatically, without even displaying the usual dialog box to ask the user to input a passcode.
My code is mainly inspired from these two stackOverflow Threads :
Auto-accept bluetooth pairing possible?
Programmatically pairing with a BLE device on Android 4.4+
The problem I'm facing :
- device #1 on android 5.1.1 : Ok
- device #2 on android 6.0 : Ok
- device #3 on android 5.1 : couldn't pair because of an incorrect pin or passkey
- device #4 on android 5.1 : couldn't pair because of an incorrect pin or passkey
I can't tell if android version has something to do with this issue. Do you have any idea that may help me make it work on devices #3 and #4 ?