如何以编程方式显示"语音识别设置"屏幕

Mar*_*ark 1 android voice-recognition

在Android应用中,如何显示系统语音识别设置屏幕?

注意:这里有一个类似的问题,但它已经过时了.

Mar*_*ark 5

Pre-Jelly Bean,这样做的方法是使用意图:

Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setClassName("com.google.android.voicesearch", "com.google.android.voicesearch.VoiceSearchPreferences");
Run Code Online (Sandbox Code Playgroud)

但是:我没有机会在Honeycomb(API 11-13)上测试这个 - 有谁知道?

Jelly Bean,您需要更改包名称:

intent.setClassName("com.google.android.googlequicksearchbox", "com.google.android.voicesearch.VoiceSearchPreferences");
Run Code Online (Sandbox Code Playgroud)