Skip to content

Android AccessibilityManager Support#31

Merged
m1maker merged 1 commit into
m1maker:mainfrom
JRJurman:android-accessibility-manager
Apr 25, 2026
Merged

Android AccessibilityManager Support#31
m1maker merged 1 commit into
m1maker:mainfrom
JRJurman:android-accessibility-manager

Conversation

@JRJurman
Copy link
Copy Markdown
Contributor

@JRJurman JRJurman commented Apr 24, 2026

Previously we only support AndroidTextToSpeech, which meant that native screen readers (namely TalkBack) could not take advantage of messages sent by SRAL. While AndroidTextToSpeech does respect some configurations from TalkBack (such as speech rate), this should allow any service or device that connects to AccessibilityManager to hook into the messages from SRAL.

Like the AndroidTextToSpeech support, this PR necessitates a java bridge to connect to AccessibilityManager. There is also a AndroidAccessibilityManager.cpp to expose the meta details and methods (this is mostly identical to AndroidTextToSpeech.cpp).

Important

This uses the event type TYPE_ANNOUNCEMENT which is marked as "Deprecated in API level 36". This is the most semantically generic event, which makes it good for this library. I'm open to changing this if there is a good generic alternative, but I think using a semantic (but incorrect) type might be worse, as that could be misleading and behave in unexpected ways. I think, since this works on modern Android devices, this should be fine, and if/when support for this event is removed, we can re-evaluate just changing the type.

As part of this PR, we are changing the bit values of SRAL engines, prioritizing SRAL_ENGINE_ANDROID_ACCESSIBILITY_MANAGER over SRAL_ENGINE_ANDROID_TEXT_TO_SPEECH (which mimics the ordering of other engines).

Like the PR for AndroidTextToSpeech, I tested this locally on a physical Android device. The code for that is beyond the scope here, but I'm happy to share any details / recordings / etc if that would be valuable.

@m1maker m1maker self-requested a review April 24, 2026 05:13
@m1maker m1maker merged commit 9113840 into m1maker:main Apr 25, 2026
3 checks passed
@JRJurman JRJurman mentioned this pull request Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants