Bluetooth security

Jan 5, 2017
1
0
0
why automatic pairing code not working in android marshmallow and latest update of nougat,

here my requirement is to auto pair between the bluetooth android devices..

my code is :

final BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);

device.setPairingConfirmation(true);

but its not working above 6.0.1 update, asking user to pair, is there any relevant code to dismiss the pairing request popup automatically and to bond between the bluetooth devices