Jump to content

Poweramp's reaction to vehicle's Steering Wheel Control differs between playing over vehicle's default BT player and over Android Auto


HyunH
Go to solution Solved by andrewilley,

Recommended Posts

Poweramp build number: build-954-bundle-play [954004-77bd98e2]
your device model: Samsung Galaxy S22 Ultra (SM-S908U1)
your Android version: Android 13
your custom ROM name/version (if you're on custom ROM): N/A
steps to reproduce:

  • [Prerequisite] Have only one playlist created, add a few tracks to the playlist, start shuffle from list header shuffle button, then pause playback.
  • [BT Playback Case]
    1. Connect phone to vehicle over BT and suppress Android Auto (doable from phone's settings).
    2. Confirm media playback of a track (Song A) through vehicle's built-in audio player.
    3. Press 'next track' steering wheel control to play next track (Song B) in queue.
    4. Wait for three seconds.
    5. Double-press 'previous track' steering wheel control to attempt moving back to Song A.
    6. [Expected Result] Song A starts playing.
      [Actual Result] Song A starts playing.
  • [Android Auto Playback Case]
    1. Reconnect the phone to vehicle again, but this time with Android Auto enabled.
    2. Confirm media playback of Song A through Poweramp in Android Auto screen.
    3. Press 'next track' steering wheel control to play next track (Song B) in queue.
    4. Wait for three seconds.
    5. Double-press 'previous track' steering wheel control to attempt moving back to Song A.
    6. [Expected Result] Song A start playing.
      [Actual Result] Poweramp attempts to play previous category, but since there is only one category (single playlist) Poweramp shuffles current playlist again and starts playing the first track in new queue.

I also logged the 'Last Processed Commands' in both cases.

[BT Playback Case]

==================
20:10:25.265 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_MEDIA_NEXT ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=240982092 sourcePak=com.android.bluetooth isAvrcp  flags=0x0 playerState=1
==================
20:10:25.273 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_MEDIA_NEXT ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=240982100 sourcePak=com.android.bluetooth isAvrcp  flags=0x0 playerState=1
==================
20:10:25.297 PlayerService NEXT
from PSMediaButtonReceiver 

==================
20:10:37.417 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_MEDIA_PREVIOUS ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=240994244 sourcePak=com.android.bluetooth isAvrcp  flags=0x0 playerState=1
==================
20:10:37.419 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_MEDIA_PREVIOUS ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=240994246 sourcePak=com.android.bluetooth isAvrcp  flags=0x0 playerState=1
==================
20:10:37.432 PlayerService PREVIOUS
from PSMediaButtonReceiver 
==================
20:10:37.643 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_MEDIA_PREVIOUS ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=240994471 sourcePak=com.android.bluetooth isAvrcp  flags=0x0 playerState=1
==================
20:10:37.657 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_MEDIA_PREVIOUS ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=240994485 sourcePak=com.android.bluetooth isAvrcp  flags=0x0 playerState=1
==================
20:10:37.695 PlayerService PREVIOUS
from PSMediaButtonReceiver

[Android Auto Playback Case]

==================
20:11:58.391 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_MEDIA_NEXT ACTION_DOWN flags=0x4 playerState=1
==================
20:11:58.393 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_MEDIA_NEXT ACTION_UP flags=0x4 playerState=1
==================
20:11:59.045 PlayerService NEXT
from PSMediaButtonReceiver 

==================
20:12:09.345 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_MEDIA_PREVIOUS ACTION_DOWN flags=0x4 playerState=1
==================
20:12:09.347 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_MEDIA_PREVIOUS ACTION_UP flags=0x4 playerState=1
==================
20:12:09.560 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_MEDIA_PREVIOUS ACTION_DOWN flags=0x4 playerState=1
==================
20:12:09.566 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON
KEYCODE_MEDIA_PREVIOUS ACTION_UP flags=0x4 playerState=1
==================
20:12:09.602 PlayerService PREVIOUS_IN_CAT
from PSMediaButtonReceiver 

 

What I'm curious is, who makes this decision whether to coalesce two consecutive button presses into single command or to perceive two presses as two distinct commands?
Is Poweramp doing that or is Android Auto playing the trick in between?

Basically, what I want is BT Playback Case's behavior even in Android Auto (double press == two distinct commands).

Thanks.

Link to comment
Share on other sites

From what you are saying, I assume your steering wheel controls provide two separate track-control buttons - a 'Next / +' button and a 'Previous / -' button. If so, then a single press on either button should change to a new track (i.e. Next Track or Previous Track) while a double-press should at least try to change Categories if available (Next Album, Next Playlist, etc). That is how it is supposed to work with MEDIA_NEXT and MEDIA_PREVIOUS events anyway, although I too find that Bluetooth does not always provide that level of control and often a double-tap is treated like two single taps.

In your examples, with BT the button press seems to be getting processed almost immediately after the button is released, rather than waiting to see if a double-press might be following. In Android Auto, that latency period seems longer so the double-press is properly detected. I don't know whether that's down to how fast you clicked the button, although the timings do look pretty similar to me, or differences in the way PA process the commands (as the AA commands are being read more as though they were triggered by physical controls on the phone rather than remote BT events).

Andre

Link to comment
Share on other sites

Hello, thank you for your reply.

So per what you said the behavior in Android Auto Playback Case is the correct one. And also it seems the decision is done on the Android( Auto)-side, rather than Poweramp-side. I get that.

But since I'm so accustomed to the behavior in BT Playback Case, I intend to find a way to use that even in Android Auto.
In that sense, here's a new question: is there a way to make Poweramp treat 'PREVIOUS_IN_CAT' command as if it got 'PREVIOUS' command twice? Is there any settings item available for that?

Thanks.

Link to comment
Share on other sites

Yes, the Android Auto behaviour is correct.

You could try turning off the Double/Triple press options for Wired and/or Bluetooth headsets in Settings=>Headset/Bluetooth, but I think that only applies to single-button - i.e. MEDIA_PLAY_PAUSE - devices, not ones that can send more specific MEDIA_NEXT and MEDIA_PREVIOUS key events.

Out of curiosity, if you've got two buttons on your car steering wheel - one for 'Next Track' and one for 'Previous Track' - why would you want to double-press on the 'Next' button to do exactly what the 'Previous' button is meant to do? I can definitely see the case with single-button headsets - where one press provides play/pause, double-click does Next, and triple-click does Previous - but I just can't see the logic in what you are asking when you've got both buttons anyway.

Andre

Link to comment
Share on other sites

6 hours ago, andrewilley said:

why would you want to double-press on the 'Next' button to do exactly what the 'Previous' button is meant to do?

Oh, no sir, not the 'Next' button; I'm double-pressing 'Previous' button indeed.

The rationale is this: when you want to go back to a previous track in the middle of current track, pressing 'Previous' button once does not do it; it only takes you to the beginning of the current track. That's why I'm double-pressing 'Previous' button, first to go back to the beginning of the track, then again to actually go back to the previous track; exactly as seen in the BT commands log dump.

Thanks.

Link to comment
Share on other sites

  • Solution
52 minutes ago, HyunH said:

when you want to go back to a previous track in the middle of current track, pressing 'Previous' button once does not do it; it only takes you to the beginning of the current track

Well that one should be easy enough to solve as it's optional. You need to disable: PA Settings=>Look and Feel=>Player UI=>"<< Button Resets Current Track". Then one tap on the Previous button will do exactly what it says on the tin and go back to the previous track.

Andre 

 

Link to comment
Share on other sites

1 hour ago, andrewilley said:

one tap on the Previous button will do exactly what it says on the tin and go back to the previous track.

Well, that could be a solution for someone but I still want to keep the basic functionality intact while achieving that double-press to go back. As I said earlier the BT behavior I explained is working just perfect for me, and I want Android Auto to mimic that behavior.

But for now, I will try what you recommended as a workaround and see if I can adapt to it. 🙃

Thank you for your time.

Link to comment
Share on other sites

If I do ever want to go back to the start of the current track and listen again, I either tap on the position-counter on the phone screen, or slide the seekbar cursor back to the zero point (which also now works with the Android Auto Coolwalk update, if you've got that yet) or at the very worst I just quickly press Previous and then Next if I'm using a headset.

Oh, and with AA on most headunits, you can even long-press on the Previous button on the steering wheel to fast-rewind.  

Andre

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...