Search code examples
androidandroid-autoandroid-mediasession

How to display playhead position/progress indicator in an Android Auto media app?


I work on an Android audio app with Android Auto support. Everything works correctly EXCEPT the Android Auto UI does not display a playhead position/progress indicator like I can see in many other audio apps.

An example is in the screenshot below: the progress indicator runs along the top of the controls, above the Play/Pause button.

Android Auto app with progress indicator

Our app: no progress indicator? Hmmm. My Android Auto audio app. No progress indicator?

  1. I'm providing the duration along with other media metadata like artist and title to the MediaSessionCompat. Android Auto correctly displays title and artist metadata.
  2. I'm providing the current playhead position via PlaybackStateCompat to the MediaSessionCompat. Android Auto correctly reflects the current playback state.
  3. When the app is playing and the device is connected via Bluetooth to my car, my car's display shows current playhead position and total duration coming from my app.

None of the documentation for creating Android Auto media apps appears to mention this UI detail. It seems like it should just work. Any suggestions?


Solution

  • The answer turns out to be embarrassingly simple and it occurred to me after I edited the question to add the screenshot from our app. HINT: notice the white pause button.

    Both the play/pause button and the progress indicator use the app theme accent color. Our accent color is basically white. The progress indicator IS there but it is white on white.

    If I darken accent color, the indicator is clearly visible. Unfortunately, Auto does not handle light accent colors very well.