Android-阻止“话语提示”读取应用程序名称和当前方向 [英] Android - Preventing TalkBack to read the application Name and current Orientation

查看:85
本文介绍了Android-阻止“话语提示”读取应用程序名称和当前方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是我在启动活动时正在使用TTS读取长字符串消息,但是TalkBack会自动在其中读取应用程序名称并剪切长字符串,这很烦人。

Problem is I am using TTS to read a long string message when my activity is launched, but TalkBack automatically reads the application name in the middle of it and cuts the long string and is very annoying.

我想在每次启动活动时都禁止TalkBack读取应用程序名称。删除其android:label属性不是可行的解决方案,因为该应用程序是由其他人控制的,因此我无法控制它。

I would like to disable the TalkBack read the Application name every time an activity is launched. Removing its android:label attribute is not a viable solution as the application is controlled by someone else and I have no control over it.

那么,在启动应用程序时,是否可以调用任何API来防止TalkBack功能读取应用程序名称?

So, Is there any API that I could call to prevent the TalkBack feature from reading the application name when an application is launched?

任何帮助将不胜感激。

请多多感谢。

问候,
Ashok

Regards, Ashok

推荐答案

一种解决方案是在以下方法中覆盖dispatchPopulateAccessibilityEvent()活动返回true。这样可以防止对讲宣布活动标签。

A solution would be to override dispatchPopulateAccessibilityEvent() in Activity to return true. This will prevent Talkback from announcing activity label.

这篇关于Android-阻止“话语提示”读取应用程序名称和当前方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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