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.

## Example queries

#### en-US, en-GB, en-CA, en-IN, en-BE, en-SG, en-AU

- Open Youtube history.
- Open ExampleApp ExampleFeature.
- Show me ExampleFeature on ExampleApp.

#### es-ES

- Abre el test feature de ExampleApp
- ExampleApp Abre test feature

#### pt-BR

- Abre o test feature do aplicativo ExampleApp
- Gostaria de abrir o test feature em ExampleApp

## Recommended fields

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

## Inventory availability by field

`feature`

- Inline inventory

## Foreground app invocation

This built-in intent supports [foreground app invocation](https://developer.android.com/guide/app-actions/foreground-app).

| 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:

#### en-US, en-GB, en-CA, en-IN, en-BE, en-SG, en-AU

- Open the ExampleFeature section.
- Show me my ExampleFeature.

## Sample XML files

For information about the `shortcuts.xml` schema, see [Create shortcuts.xml](https://developer.android.com/guide/app-actions/action-schema).


| **Deprecation notice:** Google is ending support for App Actions implemented using the
| `actions.xml` resource file. Please use the
| [Actions.xml migration guide](https://developer.android.com/guide/app-actions/legacy/migration-guide) to update your
| actions to use the fully supported Android Shortcuts framework. For details on
| the Shortcuts framework, see [App Actions overview](https://developer.android.com/guide/app-actions/overview).

<br />

### Use inline inventory

### shortcuts.xml


`feature` is an
intent parameter that supports [inline inventory](https://developer.android.com/guide/app-actions/action-schema#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.

```transact-sql
<?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>
      
```

<br />

### actions.xml


`feature` is an
intent parameter that supports [inline inventory](https://developer.android.com/guide/app-actions/action-schema#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.

```transact-sql
<?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>
```

<br />

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.

```transact-sql
  <?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>
  
```

<br />

## JSON-LD sample

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

```text
"History"
```