Skip to content

Android Auto: Reserve space for previous and next buttons

Description

Android auto does not force a specific button layout for all media players. This is helpful to provide flexibility for streaming services and dynamic radio channels where a user might only have the options to thumb-up or thumb-down a song, repeat, and skip to the next track. For VLC, a traditional layout is preferable, with a queue, optional previous, play/pause, optional next, and extended custom actions for repeat and shuffle (>2 tracks in playlist). As a motorist, I do not want the button position on-screen to relocate as I advance through the playlist. In order to force a traditional layout, we need to pass extras to the MediaSession.

See: Build media apps for Cars: Reserve unused space

I confirmed the behavior noted in the Stack Overflow post below that only two of the three extras work correctly. Since we always set the queue, we do not need to pass the parameter to reserve the queue space.

See: MediaSession Extra to reserve the Android Auto playback queue slot does not work?

Steps to reproduce

  1. Create one, two, and three track playlists with either streaming or local media
  2. Advance through the playlist
  3. Observe button position

Screenshots

Actual behavior

One streaming track:

one_track_stream

One streaming track w/repeat:

one_track_stream_repeat

Two streaming tracks:

two_track_stream

Two streaming tracks w/repeat:

two_track_stream_repeat

Three streaming tracks:

three_track_stream

Three streaming tracks w/repeat:

three_track_stream_repeat

Expected behavior

One streaming track:

one_streaming_expected

One streaming track w/repeat:

one_streaming_repeat_expected

Two tracks, first is streaming (no previous):

first_streaming_two_tracks

Two tracks, on second track:

two_tracks_expected

Last track of twelve tracks (has both shuffle and repeat custom actions):

last_track

Last track of twelve tracks (custom actions visible):

last_track_repeat

Context

App version

3.3.1

App mode

Auto

Edited by Robert Stone