Android App Actions

Updated 29 June 2019

Save

App Actions feature lets the users launch a specific feature in your app using the Google Assistant. By enabling Android App Actions to extend your app, users can easily deep link into your apps via the Assistant by simply speaking a request to the Assistant. If the user has your app already installed, the Assistant triggers deep linking when users say an invocation phrase that includes your app name, such as ”Ok Google, order a pizza from the Pizza app”.

The Android operating system has provided some built-in actions for the ease of developers.

As an example we can see this :actions.intent.ORDER_MENU_ITEM, an action to order something.

Similarly, we can check other actions as well.

To enable App Actions, you add an actions.xml file to your Android app project that tells Google what built-in intents your app supports.

Actions will run on devices back till Android 5 (API level 21). The recommended OS version is Android 8 (API level 26) or higher.

Integrating an Action in your app

Create a new actions.xml file in your res/xml directory.

Here’s an example(to book a taxi) of an actions.xml with an Action that is fulfilled using an App Links URL:

Once created, reference your actions.xml file from your AndroidManifest.xml file using a <meta-data> tag:

Key features and capabilities

  • Deep linking into Android apps
  • Android Slice triggering
  • Built-in intents for app categories
  • App Actions test tool

 

Credits

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home