自定义谷歌现在命令启动Android应用 [英] Launch Android app with custom Google Now command

查看:207
本文介绍了自定义谷歌现在命令启动Android应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到了一些其他的问题,但从来没有看到我一直在寻找的答案。我可以做一个活动,接受系统的意图,如收到的消息。还可以通过该应用接收到的谷歌载入意图像AlarmClock.ACTION_SET_ALARM。我如何设置我的应用程序接收的自定义的谷歌现在的语音命令?例如,在谷歌现在我想说
好了谷歌,[应用程序名称] [输入数据]。
然后该应用程序将被启动,将有[输入数据]来处理。这可以通过与塔斯克和AutoVoice,但我怎样才能使我的Andr​​oid应用程序侦听的任意的谷歌现在命令自己?

I've taken a look at some other questions, but never saw the answer I was looking for. I can make an activity to receive system intents, such as incoming messages. Google Now intents like AlarmClock.ACTION_SET_ALARM can also be received by the app. How can I set up my app to receive a custom Google Now voice command? For example, in Google Now I want to say
Ok Google, [App name] [input data].
Then the app would be launched and would have the [input data] to handle. This can be accomplished with Tasker and AutoVoice, but how can I make my Android app listen for any Google Now command on its own?

推荐答案

您可以隐蔽的语音到文本。您可以创建一个服务或Broadcastrecevier检测语音输入,并做适当的行动。

You can covert the voice to text. You can create a service or Broadcastrecevier to detect the voice input and do appropriate actions.

隐蔽语音至文本链接: HTTP:// WWW .androidhive.info / 2014年/ 07 / Android的语音到文本教程/

Covert voice to text link: http://www.androidhive.info/2014/07/android-speech-to-text-tutorial/

这篇关于自定义谷歌现在命令启动Android应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆