由网友(空虛de心)分享简介:这是在一个Android应用程序,如何显示系统的语音识别设置屏幕?From within an Android app, how to show the system Voice Recognition Settings screen?请注意:有一个类似的问题here但它是过时的。Note: there is a...
这是在一个Android应用程序,如何显示系统的语音识别设置屏幕?
From within an Android app, how to show the system Voice Recognition Settings screen?
请注意:有一个类似的问题here但它是过时的。
Note: there is a similar question here but it is out of date.
推荐答案
pre-果冻豆,要做到这一点的方法是使用意图:
Pre-Jelly Bean, the way to do this is using the intent:
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setClassName("com.google.android.voicesearch", "com.google.android.voicesearch.VoiceSearchPreferences");
不过:我还没有机会在蜂窝测试这个(API 11-13) - 任何人都知道
HOWEVER: I have not had a chance to test this on Honeycomb (API 11-13) - anyone know?
果冻豆,您需要更改包名称:
Jelly Bean, you need to change the package name:
intent.setClassName("com.google.android.googlequicksearchbox", "com.google.android.voicesearch.VoiceSearchPreferences");
相关推荐
最新文章