只要使用者擁有安裝 Android Auto 應用程式的 Android 手機和相容的汽車或副廠音響系統,就能充分享受 Android Auto 提供的優質車內應用程式體驗。使用者只要連結手機,就能直接在車上螢幕使用您的應用程式。只要開發人員針對 Android Auto 的車內體驗介面打造相對應的服務,Android Auto 就能與手機應用程式搭配使用。
在搭載 Android 15 以上版本的裝置上,Android Auto 可在車輛停妥時直接在車用運算主機上執行活動。這項功能僅適用於支援的停車應用程式類別中的應用程式。為了安全起見,Android Auto 會在偵測到車輛移動時自動退出應用程式。
使用者介面
圖 2:在 Android Auto 上執行的應用程式,顯示返回和結束控制項。
在 Android Auto 上執行的活動一律會以全螢幕模式執行。使用者可以從 Android Auto UI 的頂端或底部邊緣向上滑動,以便顯示控制項,用於返回或退出目前應用程式。
行為差異
由於 Android Auto 和 Android 的限制,應用程式在車用運算主機上執行時,會出現一些明顯的行為差異。
啟動其他應用程式
由於只有已聲明支援 Android Auto 的支援類別中的應用程式,才能在車用運算主機上執行活動,因此其他應用程式的意圖可能不會在車用運算主機上開啟其他應用程式。如果意圖是網頁或 Google Play 商店頁面,系統會改為在手機上開啟對應的應用程式。系統會封鎖所有其他活動啟動意圖,並通知使用者無法開啟對應的應用程式。
[[["容易理解","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-06-10 (世界標準時間)。"],[],[],null,["# Android Auto overview\n\n**Figure 1**: Android Auto\n\nAndroid Auto provides a driver-optimized app experience for users who have an\nAndroid phone with the Android Auto app and a compatible [car or aftermarket\nstereo system](https://www.android.com/auto/compatibility/). They\ncan use your app directly on their car's display by connecting their phone. You\nenable Android Auto to connect with your phone app by creating services that\nAndroid Auto uses to display a driver-optimized interface to the driver.\n| **Note:** Android Auto is only compatible with phones running Android 9 (API level 28) or higher.\n\nHow apps declare support for Android Auto\n-----------------------------------------\n\nApps declare that they support Android Auto in different ways depending on their category.\n\n### Media, Messaging, and templated apps\n\nMedia, Messaging, and templated apps declare support for Android Auto by\nincluding the following `\u003cmeta-data\u003e` element in their manifest: \n\n \u003capplication\u003e\n ...\n \u003cmeta-data\n android:name=\"com.google.android.gms.car.application\"\n android:resource=\"@xml/automotive_app_desc\"/\u003e\n ...\n \u003c/application\u003e\n\nThe contents of the resource file vary depending on your app's category: \n\n### Media\n\n```xml\n\u003cautomotiveApp\u003e\n \u003cuses name=\"media\" /\u003e\n\u003c/automotiveApp\u003e\n \n```\n\n\nSee [Add support for\nAndroid Auto to your media app](/training/cars/media/auto#manifest-car-app) for more details.\n\n### Messaging\n\n```xml\n\u003cautomotiveApp\u003e\n \u003cuses name=\"notification\" /\u003e\n \u003c!-- Include the following only if your capp can be set as the default SMS handler --\u003e\n \u003cuses name=\"sms\"\u003e\n\u003c/automotiveApp\u003e\n \n```\n\n\nSee [Build messaging\napps for Android Auto](/training/cars/messaging#manifest-messaging) for more details.\n\n### Templated apps\n\n```xml\n\u003cautomotiveApp\u003e\n \u003cuses name=\"template\" /\u003e\n\u003c/automotiveApp\u003e\n \n```\n\n\nSee [Add support for Android Auto to your templated app](/training/cars/apps/android-auto#declare-android-auto-support) for more details.\n\n### Parked apps\n\nParked apps declare support for Android Auto by including the following\n`\u003ccategory\u003e` element in the intent-filter of an activity in your app's manifest: \n\n \u003cactivity ...\u003e\n \u003cintent-filter\u003e\n \u003caction android:name=\"android.intent.action.MAIN\" /\u003e\n ...\n \u003ccategory android:name=\"android.intent.category.CAR_LAUNCHER\" /\u003e\n \u003c/intent-filter\u003e\n \u003c/activity\u003e\n\nSee [Add support for Android Auto to your parked app](/training/cars/parked/auto) for more details.\n\nParked apps\n-----------\n\nOn devices running Android 15 or higher, Android Auto supports running\nactivities directly on the head unit while parked. This capability is limited to\napps in the [supported parked app categories](/training/cars#parked). For safety purposes, Android\nAuto automatically exits an app when vehicle motion is detected.\n\n### User interface\n\n**Figure 2**: An app running on Android Auto with the back and exit controls shown.\n\nActivities run on Android Auto are always run in full screen. Users can swipe\nfrom the top or bottom edge of the Android Auto UI to pull up controls for\nnavigating back or exiting the current app.\n\n### Behavior differences\n\nDue to restrictions imposed by Android Auto and Android more generally, there\nare some notable behavior differences when an app runs on the head unit.\n\n#### Starting other apps\n\nBecause only apps in supported categories that have declared support for Android\nAuto can have their activities run on the head unit, it is likely that intents\nto other apps won't open the other app on the head unit. If the intent is for a\nweb page or Google Play Store page, the corresponding app will be opened on the\nphone instead. All other activity-launching intents are blocked and the user is\nnotified that the corresponding app can't be opened.\n\n#### Accepting permissions\n\nOn devices running Android 15, it isn't possible for users to accept\nruntime permissions requests on the head unit. When an app requests a\npermission, a dialog appears informing users to accept the permission on their\nphone screen.\n\nTrusted stores\n--------------\n\nAs described in [Test in real vehicles](/training/cars/testing#real-vehicles),\napps must be installed from a trusted source to run on a real vehicle. Trusted\nsources include the following:\n\n- Google Play\n- ONE store\n\nFrequently asked questions\n--------------------------\n\n### How can I detect if Android Auto is running?\n\nTo detect whether Android Auto is running on a device, you can use the\n`CarConnection` API that is part of the Android for Cars App Library. See\n[Connection API](/training/cars/apps#car-connection) for more details.\n| **Caution:** On devices running Android 12 or higher, Android Auto doesn't change the [UI mode](/reference/android/content/res/Configuration#uiMode) of the device when running, so don't rely on it.\n\n### In which vehicles is Android Auto available?\n\nSee the list of [compatible vehicles and stereos](https://www.android.com/auto/compatibility/vehicles/).\n\n### In which countries is Android Auto available?\n\nSee [Is Android Auto available in my country?](https://www.android.com/auto/#al-faq)"]]