I have been receiving complaints from users of my application that
have the HTC Hero.  The HTC media player on this phone always
intercepts the Bluetooth media buttons.  I searched the development
forum and found this post:

http://groups.google.com/group/android-developers/browse_thread/thread/a27230c978cc9e24

which discusses this same issue and was posted in October 2009.

Does anyone know how to work around this problem?

Even registering the broadcast receiver at the highest priority still
fails to receive the Bluetooth media button events on the HTC Hero
phone.  The Bluetooth media button registration code works fine on the
other Android phones that I have tested.

Apparently this isn't the first time HTC has done something like this,
as I also found a report of a similar problem on one of the HTC
Microsoft Mobile Devices reported here 
http://forum.xda-developers.com/showthread.php?t=451505

It seems extremely short sighted of HTC to code their media player so
that it grabs the Bluetooth AVRCP media button events in such a way
that other applications are unable to work with the Bluetooth head
phone buttons and Bluetooth in car stereo systems.

The Android broadcast receiver registration has a nice priority system
to allow sharing of the broadcast events.  Unless the user has
actually started the media player, grabbing the Bluetooth media button
broadcast events at a high priority seems to be very bad form.  Users
don't always want to use the HTC media player.  In my case, my
application is an audiobook player which provides a very different set
of features than the HTC media player, and when people are trying to
listen to an audiobook they don't want the HTC media player
intercepting all the commands.  When it does this there are two
players playing at the same time which just produces an audio mess.

My application only registers to get the Bluetooth AVRCP events while
it is running.  When the user exits the audiobook player, the
application unregisters.  This allows the Bluetooth commands to be
shared by a variety of different applications.  I can see HTC wanting
to leave their default media player registered in the background, so
it gets the Bluetooth AVRCP commands if the user has not explicitly
loaded any other media player.  But they should have done it at a
priority level below 0 just like the default Android media player does
on the other Android phones.

Does anyone know if there is a way to work around this poor behavior
of the HTC media player on the HTC Hero phones?

Or does everyone that wants to have their Bluetooth headphones and
Bluetooth in car stereo buttons work properly just need to completely
avoid the HTC Hero phone?
-- 
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