如何显示语音识别设置编程屏幕 [英] How to display Voice Recognition Settings screen programmatically

查看:212
本文介绍了如何显示语音识别设置编程屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是在一个Android应用程序,如何显示系统的语音识别设置屏幕?

From within an Android app, how to show the system Voice Recognition Settings screen?

请注意:有一个类似的问题<一href="http://stackoverflow.com/questions/8868410/how-to-show-up-the-google-voice-recognition-settings-in-my-app">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");

这篇关于如何显示语音识别设置编程屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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