Search code examples
androidwidgettoggletalkback

Is it possible to make a widget that can toggle Talkback in Android?


I'm planning to use Android platform at a kind of public devices. And I think it's difficult for most people to turn off TalkBack.

An widget button toggling the Talkback in home screen can solve the problem.

Is it possible to make this widget? Does it need rooting?


Solution

  • No, there is no way to do this. The inability to effect system services is a security feature. If you could manage to do this without root, it would be considered a bug and the method you used patched. I suppose you might be able to accomplish it as a rooted user. If you want to investigate how to do so, checkout the 4.3 branch of the AOSP, and see how the accessibility shortcut works. Then just replicate that functionality.

    As of Android 4.3 (4.2???) you can activate the Accessibility shortcut, which simplifies things! The accessibility shortcut will turn on and off your favorite Accessibility Service. I do a lot of accessibility development and this works well for me.

    Another trick is, to add a shortcut directly to the Accessibility settings, to your home screen. This makes turning TalkBack on and off a simple 2 step process.