Configure manifest files

Configure your app's manifest files to integrate with Android Auto and Android Automotive OS (AAOS). To enable discovery and connection by these platforms, declare your media browser service in the manifest. Specify the required app icons, including a launcher icon for an attribution icon for use by system UI components such as media controls.

To learn more about manifest files, see App manifest overview.

Declare your media browser service

Android Auto and AAOS connect to your app through your media browser service to browse media items. Declare your media browser service in your manifest to let Android Auto and AAOS discover the service and connect to your app.

This code snippet shows how to declare your media browser service in your manifest. Include this code in the manifest file for your AAOS module and in the manifest file for your phone app.

<application>
    ...
    <service android:name=".MyMediaBrowserService"
             android:exported="true">
        <intent-filter>
            <action android:name="android.media.browse.MediaBrowserService"/>
        </intent-filter>
    </service>
    ...
</application>

Specify app icons

To represent your app in the system UI, specify the app icons that Android Auto and AAOS should use. These two icons are required:

Define the launcher icon

The launcher icon represents your app in the system UI, such as on the launcher and in the tray of icons. You can specify that you want to use the icon from your mobile app to represent your car media app using the following manifest declaration:

<application
    ...
    android:icon="@mipmap/ic_launcher"
    ...
/>

To use a different icon than your mobile app, set the android:icon property on your media browser service's <service> element in the manifest:

<application>
    ...
    <service
        ...
        android:icon="@mipmap/auto_launcher"
        ...
    />
</application>

Define the attribution icon

The attribution icon is used in places where media content takes precedence, such as on media cards. Consider reusing the small icon used for notifications. This icon must be monochrome.

Attribution icon on media card

Figure 1. Attribution icon on media card.

You can specify an icon that is used to represent your app using this manifest declaration:

<application>
    ...
    <meta-data
        android:name="androidx.car.app.TintableAttributionIcon"
        android:resource="@drawable/ic_status_icon" />
    ...
</application>