Sending data reception via bluetooth without pairing.

Something I can not figure out:

  • Has anyone worked with bluetoothSocket?
  • createInsecureRfcommSocketToServiceRecord is what I need?
  • those. As I understood it just for sending data without pairing?

If you know, help.

if (BluetoothDevice.ACTION_FOUND.equals(action)) { BluetoothDevice device = (BluetoothDevice) intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); playNotificationSound(); try { if (device.getName().toString().contains("GT")) { bluetoothSocket = device.createInsecureRfcommSocketToServiceRecord(UUID.randomUUID()); } } catch (Exception ex){ ex.printStackTrace(); } } 
  • Well, it seems to be right, connect further, wait for confirmation of the connection, and go to communicate with the device - Vladyslav Matviienko
  • connection confirmations - how does this happen? those. one device requests access, and the other allows access (all this without user intervention - is done programmatically)? - DuosDuo

0