daneren2005 / Subsonic

Home of the DSub Android client fork
GNU General Public License v3.0
574 stars 162 forks source link

Using bluetooth song skip controls causes multiple skips forward/backward #687

Closed jamietre closed 8 years ago

jamietre commented 8 years ago

This issue has been around for a long time. I noticed in the 5.1.7 update there was a note that says "fix bluetooth multiple skips" so i was optimistic when I saw the update, but nothing has changed for me. This happens to me when connected to my car radio via bluetooth, When using the car controls to skip forward or backward in a playlist, it skips 3 or 4 songs at a time.

This seems like a pretty significant issue, yet I can't find an existing bug report related to it, so I'm guessing it doesn't affect that many people for whatever reason. Let me know if there's any further info I can provide. Seems like the forward/back skip controls need to be debounced. No other android apps show this behavior for me.

daneren2005 commented 8 years ago

I thought that it was an issue of the car reporting multiple ACTION_DOWN events so I changed to listen to ACTION_UP. If it is still sending multiple events I am not really sure what the issue is then. Can you send me a log after reproducing it via Home -> 3 dot menu -> Send Logs?

jamietre commented 8 years ago

Sure, I'd be glad to send a log, will do it on my way home tonight.

It could very well be a hardware or software problem with my car, but other apps don't exhibit this. I am not an android dev so I can't easily help with this, but as an engineering problem generally, it seems like a simple solution to avoiding this with possibly flaky input is just throttling it (e.g. don't respond to a skip event if there has been one previously within the last 1/2 second or something). That way it wouldn't really matter what kind of ugly input might come in from the button presses.

ghost commented 8 years ago

so I'm guessing it doesn't affect that many people for whatever reason

I don't encounter this issue with the JVC KD-R871BT

daneren2005 commented 8 years ago

https://github.com/daneren2005/Subsonic/commit/6946b212e47f8fd956c7f49280ae2beaf8919d48