[英]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. 当您按下按钮时,我正在尝试从我的应用程序向Google助手发送命令(特别是“早安”)。 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. 提供的答案会打开一个Google搜索,但不会打开助手。 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). 这意味着,当我将其发送为“早安”时,它只是Google搜索“早安”,而不是播放我的每日简报(这是我的预期目标)。 The intent in the question ( Intent.ACTION_VOICE_COMMAND
) opens the Assistant. 问题中的意图( Intent.ACTION_VOICE_COMMAND
)将打开助手。 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. 但是,已知该功能目前不存在。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.