简体   繁体   English

如何从 android 手机谷歌助手控制 Android 应用程序操作

[英]How to control Android app action from android phone google assistant

I want to perform an action within my android app from google assistant.我想通过谷歌助手在我的 android 应用程序中执行一项操作。

For example.例如。 I have an android app with one button, and on click of the button i get a toast saying "hello world".我有一个带有一个按钮的 android 应用程序,单击该按钮我得到一个祝酒词“hello world”。

I want to perform this toast action from google assistant.我想从谷歌助手执行这个 toast 动作。 That is:那是:

When my phone is idle, i will say "Hello google, display toast from my toast app" And the toast will be displayed.当我的手机空闲时,我会说“你好 google,从我的 toast 应用程序中显示 toast”然后会显示 toast。 And after displaying the toast i will get a reply from assistant saying " toast displayed successfully".显示吐司后,我会得到助手的回复说“吐司显示成功”。

How can i achive this?我怎样才能做到这一点?

In general, what you are looking for is called an app action .通常,您要查找的内容称为应用操作

However, app actions are only defined for specific types of apps and Intents, and only particular trigger phrases.但是,应用程序操作仅针对特定类型的应用程序和 Intent 定义,并且仅针对特定的触发短语。 You can't define your own phrases at this time.此时您无法定义自己的短语。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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