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.
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.
So, Is there any API that I could call to prevent the TalkBack feature from reading the application name when an application is launched?
Any Help would be highly appreciated.
Thanks a lot in advance.
Regards, Ashok
TalkBack is the Google screen reader included on Android devices. TalkBack gives you eyes-free control of your device. The setup of your device depends on the device manufacturer, Android version, and TalkBack version. These help pages apply to most devices, but you might experience some differences.
Open your Android device's Settings app . Select Accessibility. Switch Access. At the top, select the On/Off switch.
On your device, open Settings > Accessibility. Scroll until you find Accountable2You. Tap on Accountable2You. Toggle Accessibility to Off and then On again (it may show as on but still be disabled - this step will reset it).
In Android Studio, using Java, to set the accessibility focus on a certain myview you have to do myview. sendAccessibilityEvent(AccessibilityEvent. WINDOWS_CHANGE_ACCESSIBILITY_FOCUSED) and it works fine.
You should add this to AndroidManifest.xml
<activity
android:name="com.mobile.myapp.test"
android:label="About"
android:screenOrientation="portrait" />
Leave android:label empty if you don't want TalkBack to read activity name.
A solution would be to override dispatchPopulateAccessibilityEvent() in Activity to return true. This will prevent Talkback from announcing activity label.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With