[android-developers] Sending AVRCP play command, getting spammed with broadcast

2011-01-26 Thread James
Hello.

I have some hardware that sends the AVRCP play command to the phone
upon bluetooth connection. What I am seeing is the MEDIA_BUTTON action
intent spammed over and over in the debugger. This is causing problems
with a few apps but mainly Pandora. Pandora will constantly play/pause
over and over. It is almost like the AVRCP command gets sent to the
phone which generates a MEDIA_BUTTON broadcast that keeps getting sent
out over and over.

I set up a Broadcast Receiver to catch it and try to determine what's
going on. Here is what is being spammed:


01-17 12:20:04.324: ERROR/NPT:(1558): Intent
{ act=android.intent.action.MEDIA_BUTTON (has extras) }
01-17 12:20:04.324: ERROR/NPT:(1558): KeyEvent{action=0 code=85
repeat=0 meta=0 scancode=200 mFlags=8}

which is the bluetooth Play/Pause media key. This is what it should
be, as the AVRCP command triggers this, but as I said, it's like the
OS just keeps spamming this.

I have tried using the abortBroadcast() method to stop it but that has
no effect. I am guessing the broadcast is non-ordered and can't be
stopped explicitly?

I have verified it is not the hardware spamming the AVRCP command by
debugging my firmware code. The spamming behavior also continues if I
unplug the hardware.

I am using 2.2.

Thanks.

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


[android-developers] Sending AVRCP play command, getting spammed with broadcast

2011-01-18 Thread James
Hello.

I have some hardware that sends the AVRCP play command to the phone
upon bluetooth connection. What I am seeing is the MEDIA_BUTTON action
intent spammed over and over in the debugger. This is causing problems
with a few apps but mainly Pandora. Pandora will constantly play/pause
over and over. It is almost like the AVRCP command gets sent to the
phone which generates a MEDIA_BUTTON broadcast that keeps getting sent
out over and over.

I set up a Broadcast Receiver to catch it and try to determine what's
going on. Here is what is being spammed:


01-17 12:20:04.324: ERROR/NPT:(1558): Intent
{ act=android.intent.action.MEDIA_BUTTON (has extras) }
01-17 12:20:04.324: ERROR/NPT:(1558): KeyEvent{action=0 code=85
repeat=0 meta=0 scancode=200 mFlags=8}

which is the bluetooth Play/Pause media key. This is what it should
be, as the AVRCP command triggers this, but as I said, it's like the
OS just keeps spamming this.

I have tried using the abortBroadcast() method to stop it but that has
no effect. I am guessing the broadcast is non-ordered and can't be
stopped explicitly?

I have verified it is not the hardware spamming the AVRCP command by
debugging my firmware code. The spamming behavior also continues if I
unplug the hardware.

I am using 2.2.

Thanks.

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