Android Question Android Talkback Control Text

canalrun

Well-Known Member
Licensed User
Longtime User
Hello,
I have received feedback from deafblind users of one of my apps.

They say my app is not too friendly with Android Talkback – it doesn't identify the controls.

I have buttons that use images instead of text. I have found that if I set text with the color set to transparent, Talkback uses the text to identify the button, but the text does not interfere with my button image.

I also have ImageViews that I use like buttons (multistate buttons). Talkback identifies these controls as buttons, but the control is not identified by function because there is no text field available for an ImageView.

I am wondering is there actually a text field associated with an ImageView that is not accessible (maybe only by using JavaObject)?

Looking at the Android Developers ImageView website, it appears there is not, but I may have missed it.

Thanks,
Barry.
 

canalrun

Well-Known Member
Licensed User
Longtime User
Oooh, I get to answer my own question :D.

I use the following code to set a field called the "Content Description". This field is spoken by Talkback when the field is highlighted (Talkback active).

B4X:
Sub SetContentDesc(v As View, desc As String)
  Dim r As Reflector
 
  r.Target = v
 
  r.RunMethod2("setContentDescription", desc, "java.lang.CharSequence")
End Sub

For an ImageView that I use as a multistate button, for example, in my "Update" subroutine that updates the ImageView bitmap depending on the status, I set the Content Description to a very short string. For example, "Alerts Off" or "Alerts On".

This seems to work. I will see what the users who gave me feedback say…

Barry.
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
I will see what the users who gave me feedback say…
Good luck - this seems rather challenging in this unique situation.

Side note: How do you implement a feedback system from your apps? This could happen in many ways - but what do you use and find most effective?

Thanks
 
Upvote 0

canalrun

Well-Known Member
Licensed User
Longtime User
Hopefully this will work.

To make things even more fun, the user is in Spain (I am in USA). He probably would like Talkback to speak in Spanish. I will localize the text I set as the Content Description to Spanish and hopefully when Talkback reads it out, it will speak Spanish.

For feedback, I have a button (usually as part of a menu) that opens email with an intent (examples are on the forum) and pre-fills the To: and Subject: fields so that email is sent to my development email account.

Barry.
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
For feedback, I have a button (usually as part of a menu) that opens email with an intent (examples are on the forum) and pre-fills the To: and Subject: fields so that email is sent to my development email account.
Simple - yet effective. I shall see if I can set it to add it to a DB... for on-going tracking and resolve.

Thanks for your feedback...
 
Upvote 0
Top