简体   繁体   中英

Add google assistant custom action and detect it

I want to create a custom action for google assistant.

I did searched up for long time and I found Actions on Google . I did test it and it does work but I can't find any information how to detect this action on my app.

Is there a way to detect when Google Assistant starts and get the command that she gets with a custom service in my app?

No, there's no direct method for communicating between the Assistant on your phone and the app currently running. If your app has a login, you can use account linking to connect your Action and your app under the same user account.

There'd still be no direct method to connect the two, but you'd at least be able to share things like server state and do push notifications directly to your app to control things that may be happening.

Of course, the lack of direct interface means that sending voice commands to your app through the Google Assistant will still require a direct invocation (ie. "Talk to my test app" or "Ask my test app to (do action)")

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