[[["容易理解","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 (世界標準時間)。"],[],[],null,["# Built-in intents for App Actions\n\nBuilt-in intents (BIIs) allow your app to express its fulfillment capabilities\nto Google. By declaring capabilities in your [shortcuts.xml](https://developer.android.com/guide/app-actions/action-schema) file and\nmapping intent parameters to the fulfillment, you make it possible for\nGoogle Assistant to launch your app to a specific screen in response to a\nquery, so the user can complete a task. \n\nBuilt-in intents are grouped according to app categories. Each category\nrepresents a set of common tasks that users frequently want to perform on their\napps. The full list of available BIIs, their parameters, and example\nqueries usable for testing is in the [built-in intent reference](/reference/app-actions/built-in-intents).\n\nMany BIIs have specific deployment requirements and\nrecommendations. These requirements and recommendations help your app deliver\nthe best possible experience to your users. \n**Figure 1.** Invoke the `START_EXERCISE` BII with a voice query to Assistant. \n**Figure 2.** Launch the app to a specific screen to begin the `START_EXERCISE` task. \n**Figure 3.** Display a [widget](/guide/app-actions/widgets) in response to a query.\n\n\n---\n\nImplement BIIs and handle intent parameters\n-------------------------------------------\n\nFor App Actions, you declare capabilities and handle BII parameters\nin your [shortcuts.xml](https://developer.android.com/guide/app-actions/action-schema) file. To implement a BII and handle its\nparameters, follow these steps:\n\n1. Declare the `capability` with the chosen BII.\n2. Add nested `parameter` elements for each BII field you want to add.\n 1. If you use `targetClass` or `targetPackage`, map them to the Android intent `extras` using a name you choose.\n 2. If you use a deep link URL, use the named parameters in the query string of the URL template.\n\nTo handle a BII parameter, map the BII parameter to the\ncorresponding parameter of an explicit Android intent in your `capability`.\nThen, you can use its value in your app. Your app is not required to handle\nBII parameters. However, do attempt to handle data fields marked as \"Recommended\"\nin the [built-in intent reference](/reference/app-actions/built-in-intents).\n\nYou can define multiple intent fulfillments, each with its own set of\nrecommended parameters. Google selects the appropriate fulfillment based on the\ncapability parameters it identifies from the user's query and the ones declared\nin an intent.\n\nFor example, the [`actions.intent.START_EXERCISE`](/reference/app-actions%20built-in-intents/health-and-fitness/start-exercise)\nintent recommends that your app handle the `exercise.name` BII parameter, but you\ncan implement the BII in your app with no parameters.\nYou might do this if you want to handle user queries without the specific\nexercise name, like *\"Ask Example App to start tracking exercise.\"*\n\nThe\nfollowing snippet has a fallback to a fulfillment with no required parameters\nif the parameters are not included in the user's query: \n\n \u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n \u003cshortcuts xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n\n \u003ccapability android:name=\"actions.intent.START_EXERCISE\"\u003e\n \u003cintent\n android:action=\"android.intent.action.VIEW\"\n android:targetClass=\"com.example.myapplication.Activity1\"\n android:targetPackage=\"com.example.myapplication\"\u003e\n \u003cparameter\n android:name=\"exercise.name\"\n android:key=\"exerciseType\"\n android:required=\"true\"\n /\u003e\n \u003c/intent\u003e\n \u003cintent\n android:action=\"android.intent.action.VIEW\"\n android:targetClass=\"com.example.myapplication.Activity2\"\u003e\n \u003c/intent\u003e\n \u003c/capability\u003e\n \u003c/shortcuts\u003e\n\nGoogle Assistant does its best to provide the most relevant information to\nthe user when returning parameter values to your app. For example, user queries\nfor ordering pizza from Example Restaurant's mobile app don't always include a\nlocation. To better serve the user, Assistant might provide the latitude\nand longitude values of the nearest Example Restaurant to that app.\n\nAs an additional requirement, you don't want your app to directly perform an\naction that modifies a user's real-world state (for example, transferring\nmoney, placing an order, or sending a message) without first confirming the\naction with the user.\n\n\n| **Note:** App Actions, like all Actions that support built-in intents, trigger on a number of factors, including quality and relevancy to the user's request. Based on those factors, Google may exercise discretion in surfacing your Action in response to user requests.\n\n\u003cbr /\u003e\n\nDisambiguation\n--------------\n\nArguments passed to your app via `\u003curl-parameter\u003e` or intent extras might not\nuniquely identify the item that you want to show to the user. In this case,\nuse the argument value as a search argument and take the user to the search\npage of the app. They can disambiguate and choose the right item.\n\nFor example, if a user's query is *\"Order from Example Restaurant\"* for the\nBII `ORDER_MENU_ITEM`, you can present to the user a list of\nrestaurants whose names match the term `\"Example Restaurant\"`.\n\nLanguage and locale support\n---------------------------\n\nThe locales supported for development and testing by each App Action BII\nare listed in the [built-in intent reference](/reference/app-actions/built-in-intents). Some BIIs have different\nlocale support for developer testing and for user triggering from Assistant."]]