Trigger my Google Assistant App on pressing a button

1k Views Asked by At

I have a AIY Voice Kit fully assembled and functional (I have tested the 3 demos.py sucessfully). I managed to launch the demo where we have to push the button to launch the Google assistant. But now I wan that it ONLY trigger my Google action (and directly launch « Welcome to XXXX app. Do you want… »). How can I manage to do that ?

2

There are 2 best solutions below

3
On

You can create regular HTTP links that triggers your action if you are on a device that has assistant. See the official documentation: https://developers.google.com/actions/deploy/action-links

You can generate a URL that will link directly to the specific Action, on a per-Action basis. Users who click the Action link in a web or mobile browser will be directed to the Assistant on their device, where they'll interact directly with your corresponding Action.

You'll find it under the AoG console Actions -> <action to trigger> -> Links

enter image description here

6
On

You can override your button handler and pass in a text string by default, kinda like is done in the text input sample.

def buttonPress():
    assistant.assist(text_query="talk to XXXX app")