Open GoogleCodeExporter opened 9 years ago
This could be refined to only blocking the play media button since that's
probably the only one that's being sent on connection established. I don't have
a device that exhibits this behavior so kind of limited in testing and figuring
out exactly what's going on.
Here's what I think the basic implementation will be:
1. Add another broadcast receiver for bt connect intent, make sure it is an bt
audio intent, not bt phone. Record time of connect in some shared storage
(sharedprefs?)
2. In media button receiver, have check at top of code that checks if it's a
play and then checks the current time against the time recorded for bt audio
connect. If't is too soon after, just return to ignore it. may have to make
sure wherever we're recording the time handles concurrently. Once bt play up
and down keys are blocked, disable saftey by clearing out time. (I doubt any
device is spamming play requests on connect and don't want to block legitimate
user initiated play)
3. Add "safety" preference to preferences page that enables this feature. Make
this feature completely independent of enabling and disabling of media button
router. Some users may want only this feature.
Original comment by harleens...@gmail.com
on 3 Jul 2011 at 3:54
also make sure to spell safety right..
Original comment by harleens...@gmail.com
on 3 Jul 2011 at 3:56
I have seen this behavior on the base model head units of 2012 and 2013 Toyota
4Runner. Even more annoying, the head units send a play button press when a
phone call ends, so if a "ignore play button press after phone call ends"
option were added that would be amazing!
Original comment by drmatth...@gmail.com
on 6 Nov 2012 at 1:03
Original issue reported on code.google.com by
harleens...@gmail.com
on 3 Jul 2011 at 3:45