Android Studio – broadcast receiver for ACTION_HEADSET_PLUG not getting called
i'm having a broadcast reciever: private final BroadcastReceiver mediaReceiver = new MediaChangeReceiver(this); and i'm adding filters to it IntentFilter filter = new IntentFilter(); filter.addAction(AudioManager.ACTION_SCO_AUDIO_STATE_UPDATED); filter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED); filter.addAction(Intent.ACTION_HEADSET_PLUG); context.registerReceiver(mediaReceiver, filter); and I have listener to listen for that calls @Override public void…