1

I have developed an app for visually impaired. I created easy gestures like touch, double taps for my app and using tts for readings texts. I have a strange problem:

When I enable accessibility function like talkback. My apps gesture get disabled, I can't use any of my in-app gestures.

How do I fix this?

Thanks!

TheDevMan
  • 5,914
  • 12
  • 74
  • 144

1 Answers1

3

Which version of Android are you targeting?

You may want to look at http://support.google.com/nexus/bin/answer.py?hl=en&answer=2692469 for the Android 4.1+.

Basically, Talkback will replace many of the gestures, but on some versions of Android you can adjust these by going to

Settings > Accessibility > TalkBack > Settings > Manage shortcut gestures.

So it would make sense to just accept the values that are already supported, and not try to get around it.

Also, you didn't mention if the users are using Explore Touch (http://support.google.com/nexus/bin/answer.py?hl=en&answer=2692788)

If you want to catch these, it appears that you can use onHoverEvent according to this question:

How can I maintain a one pointer gesture when explore-by-touch is enabled?

UPDATE:

You can look at this question on how to tell if Talkback is active:

How to check if Talkback is active in JellyBean

If it is on, tell the user they need to turn it off for your program to work, perhaps.

Community
  • 1
  • 1
James Black
  • 41,583
  • 10
  • 86
  • 166
  • I tried it on my Nexus 4 and Nexus 7. Thanks James.. changing gestures is that the only option? Or Is there a way to disable the talkback or any screen reader and enable it when leaving my app? – TheDevMan Mar 03 '13 at 02:30
  • I would be shocked if a program can change something like this programmatically. – James Black Mar 03 '13 at 04:37
  • Hmm. If the device has the accessibility enabled - Can't I override the gesture method automatically? – TheDevMan Mar 03 '13 at 08:25
  • If you start with onHover and then have it go to your own onTouch as shown in the question I suggested, it appears you may be able to do that. But, I think that is risky, as it will change the behavior that the user expects. – James Black Mar 03 '13 at 20:27
  • If you show an attempt (code) then point out where you have a hard time, then it is easier to help. The link in the update shows some code, btw. – James Black Mar 09 '13 at 00:17
  • I got android 4.0.3 version tablet. tried the accessiblity there it is working fine. The only issue is on heptic sounds and tts speaking there.. for which I tried the following code but it was the same i could hear TTS and also the haptic feedback. public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { event.getText().add("Testing accessibility"); return true; } It will be great if we could fix this up? – TheDevMan Mar 29 '13 at 12:41