Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how the key mapper relay service works and how IMEs rebind to the relay service #1254

Open
7 tasks
sds100 opened this issue Jul 25, 2024 · 0 comments
Open
7 tasks
Assignees
Labels
Milestone

Comments

@sds100
Copy link
Collaborator

sds100 commented Jul 25, 2024

Key event communication architecture

  • relay service is only used on Android 14+
  • In the past it was done with broadcast receivers but link to change in API that caused us to remove it.
  • Show how the key mapper keyboard talks to different build types of Key Mapper.
  • Explain how it is used for receiving key events when the device is in a phone call so we need two-way communication between the app and keyboard.
  • Motivation: There may be more broadcast receiver restrictions in the future so just going as low-level as possible and using Binder is the most future proof. It also has less overhead. This is quite a complicated system because it must be two-way. The alternative using manifest-defined broadcast receivers is also inelegant because one has to pass messages between these broadcast receivers and the services through some 3rd class. Using Binder is also lower latency than using intents. Using a bound service is synchronous whereas broadcast receivers are asynchronous.
  • Put diagram in docs website.
  • Code for input methods to talk to the Key Event relay service can be found in KeyEventRelayServiceWrapper. It is called a relay service because this service sends key events bi-directionally between the accessibility service and input method services.
@sds100 sds100 self-assigned this Jul 25, 2024
@sds100 sds100 added the website label Jul 25, 2024
@sds100 sds100 added this to the Version 2.6 milestone Jul 25, 2024
@sds100 sds100 closed this as completed Jul 31, 2024
@sds100 sds100 reopened this Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In progress
Development

No branches or pull requests

1 participant