Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know if Android TalkBack is active?

I'm developing an application that uses TalkBack to guide people through it. However, in those situations I want to have some subtile differences in the layout of the application so navigation is easier and also have extra voice outputs (with TextToSpeech) to help guide the user.

My problem is that I only want those changes and extra outputs if the user has TalkBack active.

Is there any way to know if it is? I didn't find anything specific to access TalkBack settings directly, but I was hoping there was some form of accessing general phone settings that could let me know what I need.

Regards and thanks in advance.

like image 880
David Carvalho Avatar asked Feb 25 '11 11:02

David Carvalho


People also ask

How do I know if I have TalkBack?

Find your TalkBack versionOpen the TalkBack menu. On devices with multi-finger gestures: Three-finger tap. Or, in one motion, swipe down then right. On devices without multi-finger gestures (prior to updated Android R with TalkBack 9.1): In one motion, swipe down then right.

What activates TalkBack?

Option 1: With the volume key shortcut On the side of your device, find both volume keys. Press and hold both volume keys for 3 seconds. To confirm that you want to turn TalkBack on or off, press both volume keys for 3 seconds again.

Why can't you turn off TalkBack yet?

While setting up TalkBack on your phone, you'll see an option to enable an Accessibility shortcut for it. If you enabled it, then you can disable TalkBack easily with the volume buttons. Locate the Volume keys on your device. Press and hold the two Volume keys for 3 seconds.


1 Answers

The recommended way of doing this is to query the AccessibilityManager for the enabled state of accessibility services.

AccessibilityManager am = (AccessibilityManager) getSystemService(ACCESSIBILITY_SERVICE); boolean isAccessibilityEnabled = am.isEnabled(); boolean isExploreByTouchEnabled = am.isTouchExplorationEnabled(); 
like image 97
caseyburkhardt Avatar answered Sep 23 '22 13:09

caseyburkhardt