[null,null,["最后更新时间 (UTC):2025-08-27。"],[],[],null,["Test interoperability of Google Assistant and Google Maps with custom Apps on\nAndroid Automotive OS.\n\nOverview\n\nThis guide describes how to set up and run an Android Automotive instance with\nGoogle built-in. This guide also describes how to test the third-party\nGoogle APIs for use with navigation and voice solutions.\n\nTo learn more about these APIs, see [Implement navigation app intents](/develop/devices/assistant/intents-assistant-nav-app)\nand [Google Maps for Android Automotive Intents](/training/cars/platforms/automotive-os/android-intents-automotive).\n\nAs shown, you can use three types of intents to describe the interaction between\nassistant and navigation: navigation, search and custom actions.\nThis content describes how to test the intents with Google Maps. We also\ndescribe how integrate a custom navigation application to receive intents\nfrom Google Assistant.\n\nSetup\n\nTo get started:\n\n1. Download and install [Android Studio](/studio).\n2. Open **Tools \\\u003e Device Manager** and add the **Automotive (1408p landscape) with Google Play** image.\n3. Start the emulator image and sign in to Google Play. Search for and update Google Assistant.\n4. Extract the contents of our [demo application project](/static/training/cars/testing/gas-intents/GasIntentTests.tgz) and open the project in Android Studio (**File \\\u003e Open...**).\n5. Select **Run \\\u003e Run automotive** to install and start the demo application in the emulator.\n\nDemo\n\n[Implement navigation app intents](/develop/devices/assistant/intents-assistant-nav-app) and\n[Google Maps for Android Automotive Intents](/training/cars/platforms/automotive-os/android-intents-automotive) describe the three types of\nintents you can execute: Navigation, Search, and Custom Action.\nMain activity of demo application\n\nGoogle Maps executes the triggered operations.\n\nTo specify the demo application as the receiver of the intents triggered\nby Google Assistant:\n\n1. Go to **Settings \\\u003e Google \\\u003e Google Assistant \\\u003e Default navigation app.**\n\n Figure 1. Select the default navigation App.\n2. Click the **Microphone** icon and speak a query. For example \"Nearby\n restaurants.\". See [Extended controls, settings, and help](/studio/run/emulator-extended-controls#microphone) if the microphone\n does not work as expected.\n The intent URI is sent by Google Assistant to the navigation app to process\n further.\n\n Figure 2. Output of Google Assistant generated Intent.\n\nTechnical Details\n\nYou can use the Android Debug Bridge (adb) to trigger intents from the console.\nTo learn more, see [gas-intents-console-tests.txt](/static/training/cars/testing/gas-intents/gas-intents-console-tests.txt).\n\nTo designate that an application can receive intents from\nGoogle Assistant, include this code in the `AndroidManifest.xml` file of the\nnavigation application: \n\n \u003c!-- Navigation Intent --\u003e\n \u003cintent-filter\u003e\n \u003caction android:name=\"androidx.car.app.action.NAVIGATE\" /\u003e\n \u003ccategory android:name=\"android.intent.category.DEFAULT\"/\u003e\n \u003cdata android:scheme=\"geo\" /\u003e\n \u003c/intent-filter\u003e\n\n \u003c!-- Search Intent --\u003e\n \u003cintent-filter\u003e\n \u003caction android:name=\"android.intent.action.VIEW\" /\u003e\n \u003ccategory android:name=\"android.intent.category.DEFAULT\"/\u003e\n \u003cdata android:scheme=\"geo\" /\u003e\n \u003c/intent-filter\u003e\n\n \u003c!-- Custom Action Intents --\u003e\n \u003cintent-filter\u003e\n \u003caction android:name=\"android.intent.action.VIEW\" /\u003e\n \u003ccategory android:name=\"android.intent.category.DEFAULT\"/\u003e\n \u003cdata android:scheme=\"geo.action\" /\u003e\n \u003c/intent-filter\u003e\n\nTo add the app to\n**Settings \\\u003e Google \\\u003e Google Assistant \\\u003e Default navigation app**\nso that it can be seen and selected, add: \n\n \u003cintent-filter\u003e\n \u003caction android:name=\"android.intent.action.MAIN\" /\u003e\n \u003ccategory android:name=\"android.intent.category.APP_MAPS\" /\u003e\n \u003c/intent-filter\u003e"]]