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

Ineffective notification shade event detection against system UI languages other than english #23

Open
EmiyaSyahriel opened this issue Jun 13, 2024 · 0 comments · May be fixed by #24
Open

Comments

@EmiyaSyahriel
Copy link

I tried your app but the Translation quick tile did not work at all, so I cloned this repo and debug it, and here is what I found.

I still don't know if this also affects other devices too, but on my device which uses Bahasa Indonesia as UI language. The event.text in this code attached below, only contains 1 "Bayangan pemberitahuan" string in it's array (translation of "Notification shade"). therefore the screenshot and translate function would not be called because it did not contain "Notification shade" string in it.

if (event.packageName.equals(PACKAGE_ANDROID_SYSTEM_UI) &&
event.text.any { it.contains("Notification shade") }
) {
disableEvents()
if (translateApp == TranslateApp.GOOGLE) {
enableEventsForPackage(translateApp.packageName)
}
takeScreenshotAndTranslate()

However, even after I found the cause, I still don't know how to safely fix this part that works for all devices. maybe you can find something about it?

Additional Info

  • Device Model : Nokia X30 5G
  • Device ROM : Android One 14
  • Device Language : Bahasa Indonesia ( Indonesian )
  • App version : 0.0.7 ( or commit b009e3f since I used the repo version too )
EmiyaSyahriel added a commit to EmiyaSyahriel/screen-translator that referenced this issue Jun 13, 2024
EmiyaSyahriel added a commit to EmiyaSyahriel/screen-translator that referenced this issue Jun 13, 2024
Signed-off-by: Syahriel Ibnu Irfansyah <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant