public void initBluetooth() { if (!ensureInit()) { Log.w("[Bluetooth] Manager tried to init bluetooth but LinphoneService not ready yet..."); return; } IntentFilter filter = new IntentFilter(); filter.addCategory(BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY + "." + BluetoothAssignedNumbers.PLANTRONICS); filter.addAction(AudioManager.ACTION_SCO_AUDIO_STATE_UPDATED); filter.addAction(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED); filter.addAction(BluetoothHeadset.ACTION_VENDOR_SPECIFIC_HEADSET_EVENT); mContext.registerReceiver(this, filter); Log.d("[Bluetooth] Receiver started"); startBluetooth(); }