[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Android Automotive OS compatibility mode\n\nTo simplify the process of bringing mobile apps to Android Automotive OS devices,\ncertain cars come with a compatibility mode that addresses common issues\nfaced when bringing existing mobile apps into cars.\n\nWhile this compatibility mode is used by the [Car ready mobile\napps](/training/cars/car-ready-mobile-apps) program, apps that are not part of\nthat program can also run in it.\n\nUnderstand compatibility mode\n-----------------------------\n\nAndroid Automotive OS compatibility mode is a software feature available\non [some vehicles](#determine-support) to improve the user experience of apps\nbuilt for mobile devices when run on Android Automotive OS.\n\n### Back navigation\n\nUnlike other form factors, there is no requirement for Android Automotive OS\ndevices to have a hardware or software back affordance. The compatibility mode\naddresses this by requiring a system provided back affordance, be it a hardware\nbutton, software button, gesture, or something else. This removes the need for\napps to ensure navigability solely through their own UI elements. \ncheck_circle\n\n### With compatibility mode\n\nThe user can navigate back to the previous screen even though the app doesn't provide a back affordance in its UI. \ncancel\n\n### Without compatibility mode\n\nThe user cannot navigate back to the previous screen.\n\n### Safe area rendering\n\nIn cars, software and hardware elements such as [system bars and display\ncutouts](/training/cars/parked/automotive-os#insets-and-cutouts) may break\nassumptions made by apps developed primarily for mobile devices. The\ncompatibility mode addresses this by ensuring apps are rendered in a safe area.\n\n### Density scaling\n\nBecause the interaction distance in cars is greater than with other large screen\ndevices, touch targets and font sizes are often smaller than recommended when\nrunning on a car. The compatibility mode addresses this by allowing OEMs to\nspecify a DPI scaling factor used when rendering apps.\n\n### Activity lifecycle\n\nAs described in [Add support for Android Automotive OS to your parked\napp](/training/cars/parked/automotive-os#driver-distraction), the OS blocks your\napp's activities automatically when the car enters driving mode to reduce\ndistractions for the driver. On devices with compatibility mode,\nthe OEM's blocking UI must not be transparent, so your app is no longer visible\nand transitions to the\n[*Stopped* lifecycle state](/guide/components/activities/activity-lifecycle#onstop)\nwhen blocked.\n| **Caution:** This behavior applies to *all* applications running on a device that supports compatibility mode, not just the apps that run in compatibility mode.\n\nConfigure compatibility mode\n----------------------------\n\nBy default, your app's activities are run in compatibility mode when the device\nsupports it. Activities **aren't** run in compatibility mode when a\n`\u003cuses-feature\u003e` element for the `android.hardware.type.automotive`\nfeature is present in the manifest: \n\n \u003capplication ...\u003e\n ...\n \u003cuses-feature android:name=\"android.hardware.type.automotive\" ...\u003e\n ...\n \u003c/application\u003e\n\nIf you'd prefer for your activities to be run in display compatibility mode,\nirrespective of the `\u003cuses-feature\u003e` element described earlier,\nyou can add the following `\u003cmeta-data\u003e` element in your app's manifest: \n\n \u003capplication ...\u003e\n ...\n \u003cmeta-data android:name=\"android.software.car.display_compatibility\" android:value=\"true\"/\u003e\n ...\n \u003c/application\u003e\n\nTest your app in compatibility mode\n-----------------------------------\n\nTo test your app in compatibility mode, you can use the [generic system images\nwith compatibility mode](/training/cars/testing/emulator?filter=compatibility-mode#generic-images) or [Android Automotive OS on Pixel Tablet](/training/cars/testing/aaos-on-pixel) system\nimages.\n\nDetermine device support\n------------------------\n\nDevices that support the Android Automotive OS compatibility mode must declare\nthe `android.software.car.display_compatibility` system feature. To discover\nwhich devices support this feature, you can use the Play Console's\n[Device catalog](https://play.google.com/console/about/devicecatalog)."]]