如何显示为文本到语音在我的应用程序的设置? [英] how to show up the settings for text to speech in my app?

查看:164
本文介绍了如何显示为文本到语音在我的应用程序的设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有它使用在Android的TTS引擎,现在随着活动开始,我要展现给用户的设置present的手机TTS引擎,使他们能够改变音高,测试应用程序发动机,等这已经是$在emulator.So p $ psent,我怎么present给他们这个屏幕?

i have an application which uses the tts engine in android, now as the activity starts , i want to show to the users the settings present in the phone for the tts engine in which they can change the pitch, test the engine, etc which is already present in the emulator.So, how do i present to them this screen?

推荐答案

我不知道你是否还需要它,但我有同样的问题,我的应用程序,并发现这个职位。 我设法通过自己做,所以这个答案是为那些谁可能需要它。

I don't know if you still need it but I had the same problem for my app and found this post. I managed to do it by myself so this answer is for those who might need it as well.

ComponentName componentToLaunch = new ComponentName(
        "com.android.settings",
        "com.android.settings.TextToSpeechSettings");
Intent intent = new Intent();
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.setComponent(componentToLaunch);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);

我们创建一个明确的意图,我们必须启动com.android.settings.TextToSpeechSettings组件。 您可以使用LogCat中在Eclipse中找到任何包或组件,您都争相推出。试想一下,在ActivityManager的启动活动的消息,你会看到任何活动的封装和组件名称。

We create an explicit intent, and we have to launch the com.android.settings.TextToSpeechSettings component. You can use LogCat in eclipse to find whatever package or component you are trying to launch. Just look at the ActivityManager's Starting activity messages and you will see the package and component name of any Activity.

希望这有助于

这篇关于如何显示为文本到语音在我的应用程序的设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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