On Fri, Apr 3, 2009 at 1:35 PM, Stefan <skyntc...@gmail.com> wrote:
>
> Does anyone know what is the "proper" way of subscribing for the
> "action.MEDIA_BUTTON" - (this is sent by the button on the headset and
> currently controls the play/pause of the built in player).

It depends. What do you want to do with it? If you just want to use it
in your foreground application, then you can just handle it like any
other key in onKeyDown. Be sure to return 'true' in that case,
otherwise the system will catch the key event and turn it in to a
broadcast.
If you need to use it in a background service, then your only option
is to use a broadcast receiver at a higher priority. We're aware that
this is less than ideal and will implement something better in the
future.

--~--~---------~--~----~------------~-------~--~----~
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