This is intentional. You want the app that actually handles the button to not propagate it further. Otherwise you install, say, another music player that also uses this button, you press the button, and now both of them start playing. If you want to use the button in your app, you need to give your receiver a higher priority and call abortBroadcast when you handle the event. Since this clearly doesn't scale, we'll add a better way for sharing the use of this button in the future.
On Sun, Feb 15, 2009 at 7:54 AM, Henning Schaefer < [email protected]> wrote: > > But isn't the MEDIA_BUTTON intent useless, anyway? I tried to hook to > it, to absolutely no avail. After trying around for a couple of hours, > I decided to compare my source/manifest to the android "Music" source > - then I realized that the receiver class "MediaButtonIntentReceiver" > within the "Music" package issues an "abortBroadcast" after it has > handled the MEDIA_BUTTON intent, rendering it useless for all other > applications as long as the "Music" package is installed. Personally, > I think this is extremely annoying (as you don't have the choice > whether to enable the Media Button for the music player or not), > especially when you're trying to find out why your app isn't working > as expected for quite some time just to realize that another (system) > app is intercepting the broadcast without making it bubble through all > the applications installed on the system. > > On 30 Jan., 21:14, Marco Nelissen <[email protected]> wrote: > > And in Cupcake it's also used for the buttons on bluetooth a2dp/avrcp > > devices. > > > > On Fri, Jan 30, 2009 at 12:02 PM, Zach Hobbs <[email protected]> > wrote: > > > > > It's the button on the headset included with the G1. > > > > > Thanks, > > > Zach > > > > > On Friday 30 January 2009 12:39:37 pm Peter Jeffe wrote: > > > > Documentation for Intent.ACTION_MEDIA_BUTTON says "Broadcast Action: > > > > The "Media Button" was pressed." Anyone know exactly what the media > > > > button is? Is it intended for devices that have a dedicated hard > > > > media button, and therefore non-functional on the G1, or is it > > > > something else? Thanks. > > > > > > -- Peter > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

