Why does getIntent().getData() returns null for getIntent() actions.intent.OPEN_APP_FEATURE?

133 views Asked by At

I mechanically copied the code from Google's official document to test integrating Google Assistant actions with an app:

  <?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}" />


      <!-- 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"/>
      <entity url="myapp://deeplink/two" name="featureParam_two"/>
    </entity-set>
  </actions>

The above is the content of actions.xml. App Actions Test Tool is happy with it. When I click Run, the app is opened, but getIntent().getData() returns null.

Could anyone shed some light on this?

0

There are 0 answers