Thanks, I have successfully implemented this thanks to your help.

However, I have the following problem:

I have an application that plays audio and I listen through my
bluetooth
headset.  When I push the play/pause button on the headset, my
application
get the corresponding broadcast and pauses the audio.  However, the
built-in Android music player also gets this broadcast and starts
playing
one of its audio files.  How can I prevent this?

On Jul 2, 11:53 am, Nick Pelly <[email protected]> wrote:
> On Thu, Jul 2, 2009 at 4:36 AM,
>
> [email protected]<[email protected]> wrote:
>
> > Could someone point me to the documentation or example on how my
> > application can intercept button pushes on an already paired and
> > connected bluetooth device?
>
> AVRCP events are broadcast as media intent's if the foreground
> application does not consume them.
> For example,
> KEYCODE_MEDIA_PLAY_PAUSE
> KEYCODE_MEDIA_STOP
> etc.
>
> HFP events are consumed by the Handsfree services, and as Mark says
> there's no easy way to hook into those.
>
> Nick
>
>
>
>
>
> > Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to