简体   繁体   中英

Trigger my Google Assistant App on pressing a button

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 ?

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")

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

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM