Android Programmatically Bluetooth Pairing

后端 未结 1 1539
鱼传尺愫
鱼传尺愫 2020-12-10 21:53

I would like to programmatically pair my mobile phone with medical sensor using Bluetooth interface. I have address and PIN necessary for connecting to device but I would li

相关标签:
1条回答
  • 2020-12-10 22:14

    I think you need to use createInsecureRfcommSocketToServiceRecord() which is introduced in API 10. I've got to get this working on Android 2.2, so I used reflection to call the method as per this method & it worked. I am identifying the Bluetooth device I connect to by its friendly name & setting it to not require PIN bonding, my Android APP now connects to it without the device having to be bonded or any PIN input, so its a security concern.

    0 讨论(0)
提交回复
热议问题