简体   繁体   中英

Send Google Assistant (Specifically the Assistant, not any other search method) a command from an Android app

I'm trying to send the Google Assistant a command (specifically "Good Morning") from my app when you press a button. I found this thread that asks a similar question, but the "Correct Answer" does not work. The answer provided opens up a Google Search, but NOT the Assistant. This means that when I send it "Good Morning" it simply Google searches "Good Morning" instead of playing my daily briefing (which is my intended goal). The intent in the question ( Intent.ACTION_VOICE_COMMAND ) opens the Assistant. However, what extra do I have to set to send it a command? intent.putExtra("query", "Good Morning"); does not work.

Currently there is NO way to pass a command to your Voice Assistant. There is no input for long presses or voice commands , which are the two intents I would have used to complete this task. Whether this because of a security reason or because the Assistant is still new, is unknown. However, what is known is that this functionality currently does not exist.

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