Skip to content

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

@EmiyaSyahriel

Description

@EmiyaSyahriel

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 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions