 <p>Try to Pause music on <code>AudioManager.ACTION_AUDIO_BECOMING_NOISY</code> - it it comes before <code>AudioManager.ACTION_HEADSET_PLUG</code> (approx. about 1 sec). Something like:</p> <pre><code>IntentFilter filter = new IntentFilter(); filter.addAction(AudioManager.ACTION_HEADSET_PLUG); filter.addAction(AudioManager.ACTION_AUDIO_BECOMING_NOISY); registerReceiver(receiverHeadset, filter); </code></pre> <p>...</p> <pre><code>public class MusicIntentReceiver extends android.content.BroadcastReceiver { @Override public void onReceive(Context ctx, Intent intent) { if (intent.getAction().equals(AudioManager.ACTION_AUDIO_BECOMING_NOISY)) { // Pause music } else if (intent.getAction().equals(android.media.AudioManager.ACTION_HEADSET_PLUG)) { if(intent.getIntExtra("state",0)==1){ // 1 for plugged (if it becomes plugged) //Resume music } } } } </code></pre>