Media apps for cars overview

This guide assumes you have a media app that plays audio on a phone and that your media app conforms to Android media app architecture. You also learn what your app needs from MediaBrowserService and MediaSession to run on Android Auto or AAOS. When you complete the core media infrastructure, you can add support for Android Auto and AAOS to your media app.

Contents

These pages detail how to work with the media apps:

Create audio media apps

If your app focuses on playing audio media, use the tools described here. You can create media apps for cars in one of two ways:

  1. Use MediaBrowserService and a MediaSession to create an app that Android Auto and AAOS can connect to. This allows the infotainment screen interface to render media browsing and playback user interfaces optimized for in-car use.

    or

  2. Use the Cars App Library templates to build apps with a customized media browsing and playback experience, including custom actions. To learn more, see Build a templated media app.

This guide assumes you have a media app that plays audio on a phone and that your media app conforms to Android media app architecture. This guide describes the required components of a MediaBrowserService and MediaSession needed by your app to be compatible with Android Auto or AAOS. After you complete the core media infrastructure, you can add support for Android Auto and add support for AAOS to your media app.

Create video media apps

If the primary content provided by your app is video, see:

Before you start

Be sure to consult:

Learn key terms and concepts

These terms are used in relation to building media apps for cars:

Media browser
An API used by media apps to discover media browser services and to display their content. Android Auto and AAOS use a media browser to find your app's media browser service.
Media browser service
An Android service implemented by your media app that complies with the MediaBrowserServiceCompat API. Your app uses this service to expose content. We also support `MediaLibrarySerice'.
Media item

The media browser organizes content in a tree of MediaItem objects. A media item can have either or both of these flags. A media item that can be browsed for and played operates like a playlist. You can select the item to play all of its descendants, or you can browse its descendants.

  • FLAG_PLAYABLE indicates that the item is a leaf on the content tree. The item represents a single sound stream, such as a song on an album, a chapter in an audio book, or an episode of a podcast.

  • FLAG_BROWSABLE indicates that the item is a node on the content tree and has descendants. For example, the item represents an album, and its descendants are the songs on the album.

See additional resources

For additional information, see: