IntentFilter filter = new IntentFilter();
// Bluetooth on/off broadcasts
filter.addAction(BluetoothIntent.BLUETOOTH_STATE_CHANGED_ACTION);
// Discovery broadcasts
filter.addAction(BluetoothIntent.DISCOVERY_STARTED_ACTION);
filter.addAction(BluetoothIntent.DISCOVERY_COMPLETED_ACTION);
filter.addAction(BluetoothIntent.REMOTE_DEVICE_DISAPPEARED_ACTION);
filter.addAction(BluetoothIntent.REMOTE_DEVICE_FOUND_ACTION);
filter.addAction(BluetoothIntent.REMOTE_NAME_UPDATED_ACTION);
// Pairing broadcasts
filter.addAction(BluetoothIntent.BOND_STATE_CHANGED_ACTION);
// Fine-grained state broadcasts
filter.addAction(BluetoothA2dp.SINK_STATE_CHANGED_ACTION);
filter.addAction(BluetoothIntent.HEADSET_STATE_CHANGED_ACTION);
filter.addAction(BluetoothIntent.REMOTE_DEVICE_CLASS_UPDATED_ACTION);
mManager.getContext().registerReceiver(mBroadcastReceiver, filter);