title: Capture media button on Android >=4.0 (works on 2.3)
body: <p>I wrote some service which uses BroadcastReceiver to capture one of media buttons ("play button" from a headset), and it works perfectly on android 2.3.x (HTC Nexus One or HTC Desire)</p>
  
  <p>When I tried to run in on Android 4.0.3 (Samsung Nexus S) it doesn't work (my application doesn't receive intent "android.intent.action.MEDIA_BUTTON" and "play" button behaves as usual: stops/starts music).</p>
  
  <p>Content of manifest:</p>
  
  <blockquote>
  <pre><code>...
  &lt;application
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name" &gt;
      &lt;receiver android:name=".buttonreceiver.MediaButtonIntentReceiver" &gt;
          &lt;intent-filter android:priority="10000" &gt;
              &lt;action android:name="android.intent.action.MEDIA_BUTTON" /&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
  ...
  </code></pre>
  </blockquote>
  
  <p>Is there way to make it work on android 4.0.3
  <hr>
  edit: I've try proposed solution, I've added action and run it, but my receiver still doesn't receive intent. What is more strange registering receiver by code also doesn't work:</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.about_and_activation_view);
  
      Log.d("MR", "onCreate - " + getIntent().getAction());
  
      mReceiver = new MediaButtonIntentReceiver();
      registerReceiver(mReceiver, new IntentFilter(Intent.ACTION_MEDIA_BUTTON));
  }
  </code></pre>
  
  <p>Now I'm totally confused.</p>