Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you get a newly started Activity to announce itself in Android TalkBack?

How do you get a newly started Activity to announce itself in Android TalkBack?

All the documentation I can find only refers to Views, not Activities, and those Views only announce themselves when touched. What I need is, on a change of Activity, some spoken text to tell the user where they are in the app hierarchy. Right now, on every Activity change, TalkBack just states the app name every time, which isn't useful.

I've tried adding contentDescription to the root Layout element in the Activities layout XML, but that didn't seem to make any difference. Example:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:contentDescription="My new Activity"
>

Thanks in advance...

like image 927
Teazel Avatar asked Dec 27 '13 00:12

Teazel


People also ask

How does TalkBack work on Android?

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.

How do I stop accessibility from announcing Android button as button?

Try to uncheck the setting in TalkBack -> verbosity -> speak element type -> uncheck. Now talkback will not announce class type of view at end of content description. Save this answer. Show activity on this post.

How do I know if TalkBack is enabled Android?

More details: if you are strictly interested in whether TalkBack is enabled, use am. isTouchExplorationEnabled() . (If Select to Speak is enabled and TalkBack disabled, am. isEnabled() will still return true.)


1 Answers

Use the android:label attribute on the Activity tag in your AndroidManifest.

like image 134
Kevin Coppock Avatar answered Sep 22 '22 17:09

Kevin Coppock