Skip to content

Fix Automotive skip buttons and steering wheel controls - #6462

Draft
geekygecko wants to merge 2 commits into
mainfrom
feature/philip/automotive-skip
Draft

geekygecko wants to merge 2 commits into
mainfrom
feature/philip/automotive-skip

Conversation

@geekygecko

@geekygecko geekygecko commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Description

On Android Automotive, the car's Now Playing screen now shows Pocket Casts' skip back and skip forward buttons in place of the car's own previous and next buttons, and steering wheel buttons skip within the episode.

Before this change the skip buttons were published as a custom layout, so the car could not put them in the back and forward positions next to play/pause. Steering wheels that send next/previous had no player command to call, so pressing them did nothing.

How it works:

  • The skip buttons now take the back and forward slots, and the Automotive buttons are published as media button preferences rather than a custom layout, so they replace the car's next/previous buttons. Custom actions are pinned to overflow so Play next (which uses the next icon) can't take the forward slot.
  • All controllers are now granted seek back and seek forward. On Automotive only, they also get seek to next and seek to previous, because some steering wheels send those. Both pairs go to the app's skip back and skip forward handlers, so they move by the user's skip amounts rather than changing episode.
  • The forwarding player answers the skip commands itself instead of asking the wrapped player, which never reports them as available.
  • Removed an unused EpisodeManager dependency and unused skip icon helpers.

Testing Instructions

  1. Install the Automotive build on an Android Automotive emulator.
  2. Start playing an episode.
  3. Open the car's Now Playing screen.
  4. ✅ Skip back and skip forward appear on either side of play/pause, using the Pocket Casts skip icons, and the car's previous/next buttons are not shown.
  5. Tap skip forward, then skip back.
  6. ✅ Playback moves by the skip amounts set in Settings, and the episode doesn't change.
  7. From a terminal, send next and previous key events to mimic a steering wheel: adb shell input keyevent KEYCODE_MEDIA_NEXT, then adb shell input keyevent KEYCODE_MEDIA_PREVIOUS.
  8. ✅ Playback skips forward and back within the episode.
  9. On a phone, play an episode and check that the notification and lock screen controls still work as before.

Screenshot

Screenshot_20261126_203735

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews
  • I have updated (or requested that someone edit) the Event Horizon schema to reflect any new or changed analytics.

@geekygecko geekygecko added [Type] Bug Not functioning as intended. [Area] Automotive Android Automotive labels Nov 26, 2026
@geekygecko geekygecko added this to the 8.27 milestone Nov 26, 2026
@claude

claude Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @geekygecko's task in 2m 0s —— View job


I found nothing blocking. The skip commands are granted the same way on the controller side (transportPlayerCommands) and on the player side (getAvailableCommands), so the session's intersection includes them. seekBack/seekForward/seekToNext/seekToPrevious all call the existing skip handlers, which pick up the user's skip amounts and request source. The Automotive buttons only change when they differ from the last set, so they aren't re-published on every update. I couldn't check the media3 1.11 sources here, so I haven't confirmed how the slot-reserved buttons map to the car's legacy controls. The emulator check in the testing steps is what covers that.

Non-blocking

  • modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/playback/Media3SessionCallback.kt:222: testing step 9 would pass even without this PR, so it doesn't prove the steering wheel fix. adb shell input keyevent KEYCODE_MEDIA_NEXT/PREVIOUS arrives as a media button event. onMediaButtonEvent sends it to MediaButtonEventHandler, which treats it as a double or triple tap and runs the user's headphone-controls action. It never reaches the new seekToNext/seekToPrevious overrides. That also means a car whose steering wheel sends key events will follow headphoneControlsNextAction, not always skip. To exercise the new path, use a controller's transport-controls skip-to-next/previous call (for example the car's Now Playing controls or a test MediaController), not a key event. Then decide whether Automotive key events should bypass the headphone setting.

@dangermattic

Copy link
Copy Markdown
Collaborator
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Automotive Android Automotive [Type] Bug Not functioning as intended.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants