androiddeep-linkinggoogle-assistant-sdkapp-actionsgoogle-assistant

How to launch our installed app from google assistant using custom word


I want to open my installed app from google Assistant using custom word.

saying "OK Google, Open MYAPP -> we don't need to do anything on your behalf. Google Assistant will open the app.

saying "OK Google, Some word (Hey MyAppName) -> Now I want to open my installed app. It is possible using App Action / dialogflow ?

I have tried below code but not working for me

 <action intentName="custom.actions.intent.HEY_PRINTER" queryPatterns="@arrays/ExampleQueries1">
        <!-- Define parameters -->
        <!-- Define fulfillment -->
        <fulfillment
            fulfillmentMode="actions.fulfillment.DEEPLINK"
            urlTemplate="https://fit-actions.firebaseapp.com/stats" />

    </action>

<string-array name="ExampleQueries">
    <item>Hey printer</item>
</string-array>

Expected: saying "OK Google, Hey Printer -> I want to trigger "custom.actions.intent.HEY_PRINTER" So that my app will be open.

Can anyone suggest for this


Solution

  • I'm afraid that doesn't work. According to the official docs:

    When providing query patterns for custom intents, expect each pattern to follow an explicit invocation like "open ExampleApp and" or "start ExampleApp and". For example, consider the following user queries:

    • "Hey Google, open ExampleGameApp and start making a cake."
    • "Hey Google, open ExampleGameApp and start making an apple pie."
    • "Hey Google, start ExampleGameApp and craft 5 cake items."
    • "Hey Google, use ExampleGameApp to produce cake 5 times."