App Actions on Android

Andrés Matamoros
3 min readMar 3, 2021

App Actions allow developers to integrate their Android apps to Google Assistant. In 2020, the Google Assistant team launched new features, more Built-in Intents, a testing tool, and many learning resources to help developers bring this off. For this reason, I’ll be writing a series of articles that cover key concepts, implementation steps, and possible troubleshooting.

This post helps you to get familiar with App Actions, how they work, and how they benefit our apps.

Is Google Assistant a powerful ally for our apps?

Google Assistant already makes our lives easier; it helps us with daily multi-step tasks such as ordering food, recording workouts, playing music, and making phone calls.

Let’s think for a moment about a simple use case like creating a taxi reservation and how many steps it takes for a user to get a reservation.

Manual flow:

  1. Take their phone and unlock it.
  2. Look for the app. (perhaps — amongst dozens of other apps)
  3. Open the app.
  4. Navigate to the “book a ride” feature.
  5. Enter a drop-off address.
  6. Finally, confirm the reservation.

Leveraging Google Assistant:

  1. Say an invocation phrase such as: “Call me a [App name] to take me to San Francisco”.
  2. Confirm the reservation.

In this example, we can see that by using Google Assistant, we can reduce the number of steps from six to only two.

This is just a simple use case, but there are apps with more complex navigation in which the number of steps could increase considerably.

What are App Actions?

App Actions allow deep linking into specif features of your Android app from Google Assistant. They work as shortcuts that users can trigger by simply speaking to the Assistant.

Note: App Actions are supported on Android 5 and higher.

Built-in Intents (BIIs)

Built-in Intents let Google Assistant know what kind of actions and/or information our app can satisfy in response to user queries such asCREATE_TAXI_RESERVATION and START_EXERCISE. Also, there are common BIIs like OPEN_APP_FEATURE and GET_THING.

Google not only provides numerous BIIs, but they also maintain them for us. Check the BII index and see if your app’s category is listed.

How do App Actions work?

In an Android app, App Actions are defined in a actions.xml file. When a user says an invocation phrase, Google Assistant looks in this file and matches their request to a registered Built-in Intent and its corresponding fulfillment.

If there is a match, Assistant generates a deep link URL with the user-provided parameters and takes the user to a specif feature in the app. In some cases, the request can be satisfied by an Android Slice so that the Assistant displays the information directly to the user.

App Actions user query flow

Add voice capabilities to your app

App Actions help to get things done quickly and seamlessly. By letting users carry out actions hands-free, they let us bring another level of user experience and remove the extra friction when using certain features of our app.

Did you like this article? Drop me a line on Twitter!

--

--