如何以编程方式启动Google Assistant? [英] How to start Google Assistant programmatically?
本文介绍了如何以编程方式启动Google Assistant?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经尝试过找到的每个简单组合,但不确定如何执行此操作. 我什至尝试模拟家庭长按,但您现在得到google的声音,在logcat中的lookint会显示此
I have tried every simple combo I have found but not sure how to do this. I even tried to simulate the home long press but you get google now voice, lookint at logcat it shows this
com.google.android.googlequicksearchbox/com.google.android.apps.gsa.staticplugins.opa.OpaActivity
com.google.android.googlequicksearchbox/com.google.android.apps.gsa.staticplugins.opa.OpaActivity
但不确定这是我要寻找的还是复制它的方式.
but not sure if this is what I am looking for or how to replicate it.
推荐答案
这有效:
startActivity(new Intent(Intent.ACTION_VOICE_COMMAND).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
这篇关于如何以编程方式启动Google Assistant?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文