0

I'm trying to make my application (a calculator) accessible in TalkBack and Explore By Touch modes.

Setting it up so that all of the buttons are accessible was easy, just a matter of setting the android:contentDescription attribute.

But how do I get the app to simply announce things? E.g. if the user does "2 + 2 =", I want the voice to say "4". Now, the user could hear the result by selecting the TextView holding the answer, but I think the app would be a lot more useable if it just announced the result.

I also want to announce the annunciator, e.g. "Error: divide by zero"

Alternative way to phrase my question: How do I trigger a talkback event on a widget?

Edward Falk
  • 9,991
  • 11
  • 77
  • 112
  • 1
    Not a mobile dev, so I can't give exact answers, but found http://stackoverflow.com/questions/3234607/android-set-focus-to-a-button-widget-programmatically-oncreate-of-the-activity. My thought is if `=` is pressed go to the TextView where the calculation is – Ryan B Mar 09 '15 at 01:18
  • Seems that this is similar to http://stackoverflow.com/questions/13205498/, but is there a way to announce an arbitrary string? – Edward Falk Mar 09 '15 at 22:04
  • 1
    Set the TextView containing the error text to be a [live region](http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion). – alanv Mar 24 '15 at 22:09
  • Thanks for the suggestion. Unfortunately, that seems to be new in API 19 and I'm trying to support back to API 4. – Edward Falk Apr 15 '15 at 21:19

0 Answers0