Bluetooth connection without pairing

前端 未结 1 490
情话喂你
情话喂你 2020-12-10 08:17

I was looking to find a method to connect two phones using bluetooth without having to first pair them. I am trying to omit the annoying bluetooth pop up request. There is a

相关标签:
1条回答
  • 2020-12-10 08:41

    You may create an insecure bluetooth serial connection between two devices.

    To create a connection:

    Identify the BluetoothDevice and call its method createInsecureRfcommSocketToServiceRecord

    To receive a connection:

    Get hold of BluetoothAdapter and call the method listenUsingInsecureRfcommWithServiceRecord

    This technique won't require the devices to establish a connection using pairing code. Its available in API level 10 and above.

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