Open app feature

Action ID
actions.intent.OPEN_APP_FEATURE
Description

Launch a feature of the app. This intent is especially useful to help users navigate to features within your app which may be otherwise be difficult to find, or require multiple taps to get to.

You must specify inline inventory for the feature parameter. Provide the app feature names as entities.

Avoid using Android Slices for this built-in intent.

Inline inventory for this built-in intent can only be tested for a period of 6 hours after a preview is created or updated. Update the test tool preview or create a new preview to reset the 6 hour time period.

Locale support

Functionality Locales
Preview creation using App Actions test tool en-US, en-GB, en-CA, en-IN, en-BE, en-SG, en-AU
User invocation from Google Assistant en-US, en-GB, en-CA, en-IN, en-BE, en-SG, en-AU

Example queries

The following fields represent essential information that users often provide in queries that trigger this built-in intent:

feature

Inventory availability by field


Foreground app invocation

This built-in intent supports foreground app invocation.

Functionality Locales
Preview creation using App Actions test tool en-US, en-GB, en-CA, en-IN, en-BE, en-SG, en-AU
User invocation from Google Assistant

The following example queries are specific to intent matching for foreground app invocation:

Sample XML files

For information about the actions.xml schema, see Create actions.xml. For information about the shortcuts.xml schema, see Create shorcuts.xml.

Use inline inventory

shortcuts.xml

feature is an intent parameter that supports inline inventory. By defining a <shortcut> for feature, you can uniquely identify entities that are of interest to your app or restrict fulfillment to the set of supported entities.

In the following example, when the user query matches the featureParam_one shortcut, Assistant provides the associated shorcut identifier, ID_ONE, as the URL parameter featureParam to fulfillment.

<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample shortcuts.xml -->
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
  <capability android:name="actions.intent.OPEN_APP_FEATURE">
    <intent
      android:targetPackage="YOUR_UNIQUE_APPLICATION_ID"
      android:targetClass="YOUR_TARGET_CLASS">
      <parameter
        android:name="feature"
        android:key="featureParam"/>
    </intent>
    </capability>
    <!-- Short and long labels must be @string resource. -->
    <shortcut
      android:shortcutId="ID_ONE"
      android:shortcutShortLabel="@string/shortcut_short_label"
      android:shortcutLongLabel="@string/shortcut_long_label">
      <capability-binding android:key="actions.intent.OPEN_APP_FEATURE">
        <parameter-binding
          android:value="featureParam"
          android:key="feature"/>
      </capability-binding>
    </shortcut>
</shortcuts>
      

actions.xml

feature is an intent parameter that supports inline inventory. By defining an <entity-set> for feature, you can uniquely identify entities that are of interest to your app or restrict fulfillment to the set of supported entities.

In the following example, when the user query matches the featureParam_one entity, Assistant provides the associated identifier, ID_ONE, as the URL parameter featureParam to fulfillment.

<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample actions.xml -->
<actions>
  <action intentName="actions.intent.OPEN_APP_FEATURE">
    <fulfillment urlTemplate="myapp://deeplink{?featureParam}" >
      <!-- featureParam = "ID_ONE" or "ID_TWO"  -->
      <parameter-mapping urlParameter="featureParam" intentParameter="feature" />
    </fulfillment>

    <!-- Define parameters with inventories here -->
    <parameter name="feature">
      <entity-set-reference entitySetId="featureParamEntitySet"/>
    </parameter>
  </action>

  <entity-set entitySetId="featureParamEntitySet">
  <!-- Provide an identifier per entity -->
    <entity identifier="ID_ONE" name="featureParam_one" alternateName="@array/featureParam_one_synonyms"/>
    <entity identifier="ID_TWO" name="featureParam_two" alternateName="@array/featureParam_two_synonyms"/>
  </entity-set>
</actions>

The url attribute associated with the entity can be used to determine the fulfillment URL if there is an inventory match. In the following example, when the user query matches the featureParam_one entity, Assistant provides myapp://deeplink/one as the fulfillment URL.

  <?xml version="1.0" encoding="utf-8"?>
  <!-- This is a sample actions.xml -->
  <actions>
    <action intentName="actions.intent.OPEN_APP_FEATURE">
      <!-- Use url from inventory match for deep link fulfillment -->
      <fulfillment urlTemplate="{@url}" />

      <!-- Provide a fallback fulfillment with no required parameters. For example, to your app search or router deeplink -->
      <fulfillment urlTemplate="myapp://deeplink" />

      <!-- Define parameters with inventories here -->
      <parameter name="feature">
        <entity-set-reference entitySetId="featureParamEntitySet"/>
      </parameter>
    </action>

    <entity-set entitySetId="featureParamEntitySet">
      <!-- Provide a URL per entity -->
      <entity url="myapp://deeplink/one" name="featureParam_one" alternateName="@array/featureParam_one_synonyms"/>
      <entity url="myapp://deeplink/two" name="featureParam_two" alternateName="@array/featureParam_two_synonyms"/>
    </entity-set>
  </actions>
  

JSON-LD sample

The following JSON-LD sample provides some example values that you can use in the App Actions test tool:

"History"