Even though this a little old question, I am adding my findings, so that it will help new visitors.
To receive Intent.ACTION_MEDIA_BUTTON broadcast registering intent from code is not required. Documentation says intent has to be registered in the manifest. Could not get it working from registering from code.
Use registerMediaButtonEventReceiver
Setting priority in manifest android:priority="<int value>"
works. I used 2147483647 and was even able to override the stock player. I read winamp is using the highest priority.
Hope this helps.