We recommend implementing Android
widgets for this built-in intent. A widget presents information or
interaction options from your app to improve user engagement in Google
Assistant. Widgets are available for App Actions implementations using
shortcuts.xml.
If you have a legacy App Actions implementation using
actions.xml, use
Android slices instead. We recommend
migrating your
implementation to shortcuts.xml to take advantage of widgets
fulfillment and other improvements.
[null,null,["Last updated 2024-09-04 UTC."],[],[],null,["# Get charging station\n\nAction ID\n: `actions.intent.GET_CHARGING_STATION`\n\nDescription\n: Get charging station. May specify an app name or location.\n\nExample queries\n---------------\n\n#### en-US\n\n- Find charging station on ExampleApp\n- Find charging station near SFO on ExampleApp\n\nOther supported fields\n----------------------\n\nThe following fields represent information that users often provide to\ndisambiguate their needs or otherwise improve their results:\n[`chargingStation.@type`](https://schema.googleapis.com/ChargingStation) \n[`chargingStation.address`](https://schema.googleapis.com/address) \n[`chargingStation.name`](https://schema.googleapis.com/name) \n[`chargingStation.geo.@type`](https://schema.googleapis.com/geo) \n[`chargingStation.geo.latitude`](https://schema.googleapis.com/latitude) \n[`chargingStation.geo.longitude`](https://schema.googleapis.com/longitude) \n\nAndroid widgets and slices\n--------------------------\n\nWe recommend [implementing Android\nwidgets](/guide/app-actions/widgets) for this built-in intent. A widget presents information or\ninteraction options from your app to improve user engagement in Google\nAssistant. Widgets are available for App Actions implementations using\n[shortcuts.xml](/guide/app-actions/action-schema).\n\nIf you have a legacy App Actions implementation using\n[actions.xml](/guide/app-actions/legacy), use\n[Android slices](/guide/app-actions/slices) instead. We recommend\n[migrating](/guide/app-actions/legacy/migration-guide) your\nimplementation to `shortcuts.xml` to take advantage of widgets\nfulfillment and other improvements.\n\nSupported text values by field\n------------------------------\n\n`chargingStation.@type`\n\n- ChargingStation\n\n`chargingStation.geo.@type`\n\n- GeoCoordinates\n\nSample XML files\n----------------\n\nFor information about the `shortcuts.xml` schema, see [Create shortcuts.xml](/guide/app-actions/action-schema).\n\n\n| **Deprecation notice:** Google is ending support for App Actions implemented using the\n| `actions.xml` resource file. Please use the\n| [Actions.xml migration guide](/guide/app-actions/legacy/migration-guide) to update your\n| actions to use the fully supported Android Shortcuts framework. For details on\n| the Shortcuts framework, see [App Actions overview](/guide/app-actions/overview).\n\n\u003cbr /\u003e\n\n### Handle BII parameters\n\n### shortcuts.xml\n\n\n```carbon\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003c!-- This is a sample shortcuts.xml --\u003e\n\u003cshortcuts xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n \u003ccapability android:name=\"actions.intent.GET_CHARGING_STATION\"\u003e\n \u003cintent\n android:action=\"android.intent.action.VIEW\"\n android:targetPackage=\"YOUR_UNIQUE_APPLICATION_ID\"\n android:targetClass=\"YOUR_TARGET_CLASS\"\u003e\n \u003c!-- Eg. name = \"Googleplex\" --\u003e\n \u003cparameter\n android:name=\"chargingStation.name\"\n android:key=\"name\"/\u003e\n \u003c!-- Eg. address = \"1600 Amphitheatre Pkwy, Mountain View, CA 94043\" --\u003e\n \u003cparameter\n android:name=\"chargingStation.address\"\n android:key=\"address\"/\u003e\n \u003c!-- Eg. latitude = \"37.3861\" --\u003e\n \u003cparameter\n android:name=\"chargingStation.geo.latitude\"\n android:key=\"latitude\"/\u003e\n \u003c!-- Eg. longitude = \"-122.084\" --\u003e\n \u003cparameter\n android:name=\"chargingStation.geo.longitude\"\n android:key=\"longitude\"/\u003e\n \u003c/intent\u003e\n \u003c/capability\u003e\n\u003c/shortcuts\u003e\n \n```\n\n\u003cbr /\u003e\n\n### actions.xml\n\n\n```carbon\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003c!-- This is a sample actions.xml --\u003e\n\u003cactions\u003e\n \u003caction intentName=\"actions.intent.GET_CHARGING_STATION\"\u003e\n \u003cfulfillment urlTemplate=\"myapp://custom-deeplink{?name,address,latitude,longitude}\"\u003e\n \u003c!-- e.g. name = \"Googleplex\" --\u003e\n \u003c!-- (Optional) Require a field eg.name for fulfillment with required=\"true\" --\u003e\n \u003cparameter-mapping urlParameter=\"name\" intentParameter=\"chargingStation.name\" required=\"true\" /\u003e\n \u003c!-- e.g. address = \"1600 Amphitheatre Pkwy, Mountain View, CA 94043\" --\u003e\n \u003cparameter-mapping urlParameter=\"address\" intentParameter=\"chargingStation.address\" /\u003e\n \u003c!-- e.g. latitude = \"37.3861\" --\u003e\n \u003cparameter-mapping urlParameter=\"latitude\" intentParameter=\"chargingStation.geo.latitude\" /\u003e\n \u003c!-- e.g. longitude = \"-122.084\" --\u003e\n \u003cparameter-mapping urlParameter=\"longitude\" intentParameter=\"chargingStation.geo.longitude\" /\u003e\n \u003c/fulfillment\u003e\n\n \u003c!-- Provide a fallback fulfillment with no required parameters. For example, to your app search or router deeplink --\u003e\n \u003cfulfillment urlTemplate=\"myapp://deeplink\" /\u003e\n \u003c/action\u003e\n\u003c/actions\u003e\n```\n\n\u003cbr /\u003e\n\nJSON-LD sample\n--------------\n\nThe following JSON-LD sample provides some example values that you can\nuse in the App Actions test tool: \n\n```carbon\n{\n \"@context\": \"http://schema.org\",\n \"@type\": \"ChargingStation\",\n \"address\": \"1600 Amphitheatre Pkwy, Mountain View, CA 94043\",\n \"geo\": {\n \"@type\": \"GeoCoordinates\",\n \"latitude\": \"37.3861\",\n \"longitude\": \"-122.084\"\n },\n \"name\": \"Googleplex\"\n}\n```"]]