Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to integrate the OPEN_APP_FEATURE action into an Android application?

I want to be able to launch some features of my Android app ("Start", "Stop"), through voice commands from Google Assistant.

  1. What are the next steps to be able to launch these features from Google Assistant?
  2. What are the natural language queries supported by this Open App Feature?

I have integrated actions.intent.OPEN_APP_FEATURE into my app and tested it successfully through the App Actions Test Tool in Android Studio.

My actions.xml:

<?xml version="1.0" encoding="utf-8"?>
<actions>
    <action intentName="actions.intent.OPEN_APP_FEATURE">
        <fulfillment urlTemplate="http://www.my-app.com/{?featureName}">
            <parameter-mapping
                intentParameter="feature"
                urlParameter="featureName" />
        </fulfillment>

        <parameter name="feature">
            <entity-set-reference entitySetId="FeatureEntitySet" />
        </parameter>
    </action>

    <entity-set entitySetId="FeatureEntitySet">
        <entity
            name="@string/start_capture"
            identifier="START" />
        <entity
            name="@string/stop_capture"
            identifier="STOP" />
    </entity-set>
</actions>

When asking Google Assistant something like "Open start from MyApp" I was expecting the same behavior as when testing through the App Actions Test Tool (open the feature of the app), but Google Assistant provides generic web results instead.

like image 733
Jérôme Pietri Avatar asked Jun 20 '19 08:06

Jérôme Pietri


1 Answers

It turns out, that there is a bug preventing from triggering an Open App Feature from Google Assistant.

like image 76
Jérôme Pietri Avatar answered Oct 18 '22 07:10

Jérôme Pietri