How to use broadcast receiver to listen to bluetooth pairing request?
<p>I want to trigger something when receive a pairing request from another android device through bluetooth, I registered the broadcast receiver in my activity but it does not work. Anyone know how to do that?</p>

<pre><code>    IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_PAIRING_REQUEST);
    Log.i("BLE Pairing Info", "111");
    this.registerReceiver(bluetoothReceiver, filter);
    bluetoothReceiver = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            String action = intent.getAction();

            if (BluetoothDevice.ACTION_PAIRING_REQUEST.equals(action)) {
                BluetoothDevice dev = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
                Log.i("BLE Pairing Info",action);
                //dev.setPairingConfirmation(true);
            }

        }
    };
</code></pre>