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.
For an example, look at isScreenReaderActive()
in HomeLauncher.java file in the Eyes-Free shell application (via groups thread).
To sum up: you detect all screen readers with Intents, then query the status provider of each to see if it is active.
If you really want to limit it to TalkBack only, you could try checking the ResolveInfo.serviceInfo.packageName
for each result returned from queryIntentServices()
to see if it matches the TalkBack package.