In addition to the guidelines described in Build parked apps for Android Automotive OS, there are some requirements specific to video apps.
Depend on the android-automotive-video library
In addition to the manifest elements described in Build parked apps for Android
Automotive OS, video apps built for
Android Automotive OS must include the following
<uses-library>
element in the
AndroidManifest.xml
file:
<manifest ...>
...
<application ...>
...
<uses-library
android:name="android-automotive-video"
android:required="true"/>
...
</application>
</manifest>
Mark your app as a video app
To indicate that your app supports video, add an XML file
named automotive_app_desc.xml
to the res/xml/
directory in your project.
In this file, include the following content:
<automotiveApp>
<uses name="video"/>
</automotiveApp>
Then, within the <application>
element of your manifest, add the following
<meta-data>
element referencing
the XML file:
<meta-data
android:name="com.android.automotive"
android:resource="@xml/automotive_app_desc"/>
Test video apps on Android Automotive OS
In general, follow the instructions available at
Test Android apps for cars. Only the SDK 30
and 32 emulators available through Android Studio include the
android-automotive-video
library, so use them for testing the
Automotive OS build of your app. Lower SDK emulators don't have the library,
so adb
installation of apps that require the library fail. The library might
be included on production vehicles at lower OS levels.
Frequently asked questions
Is Widevine DRM supported?
Yes, Widevine DRM L3 is supported on Android Automotive OS.