简体   繁体   中英

How to make Google Assistant on Android Things 1.0 call my app with different parameters

I'm programming a Java/Android on a RaspBerry PI 3 using Android Things 0.6 version. According to the news, google released today (07/05/2018) a version of the operation system supporting Google Assistant for Android Things 1.0.

Does anybody know how to make the assistant call my app sending different parameters on the intent to my Activity? The idea is enabling voice command to different behaviors of my app taking advantage of the assistant.

If you register custom device actions , you are able to get callbacks when running the sample when the user says specific phrases.

Specifically, you create and deploy an action package, then check for a device action in the AssistResponse . It will allow you to get back parameters and general commands.

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