Google Assistant App Actions Development
App Actions—mechanism through which Android app registers supported voice commands in Google Assistant ecosystem. User says "start workout in [App]"—Assistant launches the right screen directly, without manual app search. Developing App Actions means creating capabilities configuration, mapping NLU parameters, and handling intents inside app.
App Actions Architecture
Central file—shortcuts.xml in res/xml/. Contains <capability> elements, each describing one supported Built-in Intent (BII). File is linked to manifest and loaded to Actions Console on publish.
Capability structure:
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<capability android:name="actions.intent.START_EXERCISE">
<intent
android:targetPackage="com.example.fitness"
android:targetClass="com.example.fitness.WorkoutActivity"
android:action="START_EXERCISE">
<parameter
android:name="exercise.name"
android:key="exercise_type"
android:mimeType="text/plain" />
</intent>
<slice-presentation
android:shortcutId="start_running"
android:title="Start running" />
</capability>
</shortcuts>
exercise.name—BII parameter that Google's NLU engine extracts from voice command. If user said "start running", value will be running. Activity gets it via intent.getStringExtra("exercise_type").
Fulfillment Types
Android Intent: Activity launches directly via Intent. Simplest path, suits most cases.
Deep link: instead of Activity class, URL is specified, handled via App Links or custom URI scheme. More flexible—can use existing deep link infrastructure.
In-app UI via Slices: deprecated approach, Android Slices deprecated since Android 11. Don't use in new projects.
Inline Inventory
For BII that accept specific values from closed set (for example, track list, workout categories), you can declare <shortcut> bound to capability. Assistant offers these values to user as suggestions and confirms selection before launch:
<shortcut android:shortcutId="yoga_workout" android:shortcutShortLabel="@string/yoga">
<capability-binding android:key="actions.intent.START_EXERCISE">
<parameter-binding
android:key="exercise.name"
android:value="@array/yoga_synonyms" />
</capability-binding>
</shortcut>
yoga_synonyms—string-array with variants: "yoga", "yoga", "stretching". NLU matches them to yoga_workout shortcut.
Actions Console and Publishing
App Actions require registration in Google Actions Console (console.actions.google.com)—separate tool from Google Play Console. Capabilities configuration verification, simulator testing, and publishing happen there.
For testing without Production release: gactions CLI + Google Assistant plugin in Android Studio 4.1+. Command gactions deploy preview uploads configuration to draft, after which Assistant on test device (same account) processes commands.
Common issue: Actions Console requires app published in Google Play (at least Internal track). Development without published app—only via test mode with limitations.
Handling in App
Activity declared as targetClass must correctly handle Intent in all launch modes: cold start, return from background, transition from another screen. Parameters that NLU couldn't extract arrive as null—app must show selection screen instead of crashing.
Analytics: each App Actions launch should be logged with parameters to understand which BII are actually used. Firebase Analytics or Amplitude, custom event assistant_app_action with parameter bii_name.
Developing App Actions with 2–4 BII, inline inventory, testing via Actions Console and publishing: 3–5 days. Cost is calculated individually.







