简体   繁体   English

禁用特定应用程序的对讲

[英]Disabling talkback for specific application

i have a project to modify android phone for blind people, thus i used android text to speech. 我有一个项目来修改盲人的Android手机,因此我使用Android文本语音。

I've managed to create a SMS and phone application using TTS library from http://code.google.com/p/eyes-free/ and use myTTS.speak to speak a text. 我已经设法使用http://code.google.com/p/eyes-free/中的 TTS库创建了一个短信和电话应用程序,并使用myTTS.speak来说出文字。

the problem comes when i use talkback to speak other application like a launcher, browser etc. when i use talkback they can speak those app, but when i open my app ( SMS and Phone) there are two sound, first from talkback and from built in myTTS.speak in my app, how i can disabling talkback only in my app(SMS and Phone)?so the speak only come from my app built in TTS, because i'll need talkback when i open other app 问题来自当我使用对讲来说其他应用程序,如启动器,浏览器等。当我使用对讲时,他们可以说那些应用程序,但当我打开我的应用程序(短信和电话)有两个声音,首先来自对讲和建立在我的应用程序的myTTS.speak中,我如何才能在我的应用程序(短信和手机)中禁用对讲?所以说话只来自我在TTS内置的应用程序,因为当我打开其他应用程序时我需要对讲

thanx 感谢名单

Instead of disabling or muting TalkBack, you could detect that it is running (by checking all running processes), and mute your app's self-voicing when TalkBack is running. 您可以检测到它正在运行(通过检查所有正在运行的进程),并在TalkBack运行时将应用程序的自我声音静音,而不是禁用或静音TalkBack。 You should of course preserve your app's self-voicing for those messages that TalkBack would not speak. 您当然应该保留应用程序对于TalkBack不会说的消息的自我表达。

Alternatively, to keep TalkBack from receiving (and speaking) events from your app you can use the mechanisms discussed here . 或者,为了防止TalkBack从您的应用程序接收(和说话)事件,您可以使用此处讨论的机制。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM