For a media application you need to register a broadcast receiver for
Intent.ACTION_MEDIA_BUTTON and then when the callback is called you
want to handle the following key codes:

These key codes are sent from Bluetooth devices such as headphones and
in car stereos:
KEYCODE_MEDIA_PLAY_PAUSE
KEYCODE_MEDIA_NEXT
KEYCODE_MEDIA_PREVIOUS
KEYCODE_MEDIA_FAST_FORWARD
KEYCODE_MEDIA_REWIND
KEYCODE_MEDIA_STOP

This key code is sent from the wired headset call button:
KEYCODE_HEADSETHOOK

Good luck!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to