[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-27 UTC。"],[],[],null,["# Build video apps for Android Automotive OS\n\nIn addition to the guidelines described in [Build parked apps for Android\nAutomotive OS](/training/cars/parked/automotive-os), there are some requirements specific to video apps.\n| **Design guidelines:** Refer to [Adapt video apps](https://developers.google.com/cars/design/create-apps/parked-passenger-apps/overview) for UX guidance specific to video apps.\n| **Important:** Google takes driver distraction very seriously. Your app must meet specific criteria before it can be listed on Google Play for Android Automotive OS. By adhering to these requirements, you can make it easier to build and test your app. For more information, see [Android app quality for cars](/docs/quality-guidelines/car-app-quality?category=video).\n\nMark your app as a video app\n----------------------------\n\nTo indicate that your app supports video, add an XML file\nnamed `automotive_app_desc.xml` to the `res/xml/` directory in your project.\nIn this file, include the following content: \n\n \u003cautomotiveApp\u003e\n \u003cuses name=\"video\"/\u003e\n \u003c/automotiveApp\u003e\n\n| **Note:** You might see a lint error in Android Studio that says \"Expecting one of `media`, `notification`, `sms`, or `template` for the name attribute in uses tag.\" This can be safely ignored by adding `tools:ignore=\"InvalidUsesTagAttribute\"` to the `\u003cuses\u003e` element.\n\nThen, within the [`\u003capplication\u003e`](/guide/topics/manifest/application-element) element of your manifest, add the\nfollowing [`\u003cmeta-data\u003e`](/guide/topics/manifest/meta-data-element) element referencing the XML file: \n\n \u003cmeta-data\n android:name=\"com.android.automotive\"\n android:resource=\"@xml/automotive_app_desc\"/\u003e\n\nSupport audio while driving\n---------------------------\n\nAudio while driving is a beta feature \nPublishing apps that support audio while driving is limited to early access partners. While this feature is in beta, you can prepare your app for support by following the guidance in this section. \n[Nominate yourself to be an early access partner →](https://goo.gle/440dHqw) \n\nIn general, all video apps must pause playback when user experience restrictions\nare active, as described in [Meet driver distraction requirements](/training/cars/parked/automotive-os#driver-distraction).\n\nHowever, some vehicles have the ability to display driving-optimized playback\ncontrols while user experience restrictions are active, making it possible to\ncontinue playing audio.\n**Figure 1**: Driving optimized playback controls for an app that supports audio while driving. \n[Codelab\nFollow a step-by-step guide to implement support for audio while driving\narrow_forward](/codelabs/audio-while-driving)\n\n### Declare that your app supports audio while driving\n\nTo indicate that your app supports audio while driving, add the following\n[`\u003cuses-feature\u003e`](/guide/topics/manifest/uses-feature-element) element in your manifest: \n\n \u003capplication ...\u003e\n ...\n \u003cuses-feature android:name=\"com.android.car.background_audio_while_driving\" android:required=\"false\"\u003e\n ....\n \u003c/application\u003e\n\n| **Important:** Setting the `android:required` attribute to `false` ensures that your app can still be distributed to devices that don't support audio while driving.\n\n### Support background playback\n\nBecause your app's activities are hidden by the system UX restrictions, your app\nmust support background playback to continue playing audio while driving. See\n[Background playback with a MediaSessionService](/media/media3/session/background-playback) for details on how to\naccomplish this using the Media3 library.\n\nYour app must post a [`MediaStyle`](/reference/androidx/media/app/NotificationCompat.MediaStyle) notification that includes your app's\n`MediaSession`. If you're using `MediaSessionService`, this is [handled for you\nby default](/media/media3/session/background-playback#notification).\n| **Caution:** If you don't use a service for background playback, playback may continue for a short period of time, but your app will eventually be [cached](/guide/components/activities/process-lifecycle) by the system, causing playback to end.\n\n### Determine support\n\nTo determine if a device supports audio while driving, you can use the\n[`CarFeatures`](/reference/androidx/car/app/features/CarFeatures#summary) class from the [`androidx.car.app:app`](/jetpack/androidx/releases/car-app) library. \n\n CarFeatures.isFeatureEnabled(context, CarFeatures.FEATURE_BACKGROUND_AUDIO_WHILE_DRIVING)\n\nUse this information to modify your app's behavior depending on the capabilities\nof the device it's running on. On devices that don't support audio while\ndriving, your app must still meet the [`DD-2`](/docs/quality-guidelines/car-app-quality?category=video#DD-2) guideline.\n\n### Test audio while driving\n\nTo test your implementation, you can [simulate driving](/training/cars/testing/emulator#simulate-driving) can using an\n[emulator image that supports audio while driving](/training/cars/testing/emulator?filter=audio-while-driving#generic-images).\n| **Caution:** Be sure to test that your app still meets the [`DD-2`](/docs/quality-guidelines/car-app-quality?category=video#DD-2) guideline on devices that don't support audio while driving.\n\nFrequently asked questions\n--------------------------\n\n### Is Widevine DRM supported?\n\nYes, Widevine DRM L3 is supported on Android Automotive OS."]]