lochidev / Expandroid

Text expander for android - with espanso config import/export
Other
142 stars 6 forks source link

## Keeps Asking for Accessibility API Permission Even Though It Has Permission #34

Open HowdyImSWIM opened 2 months ago

HowdyImSWIM commented 2 months ago

Description

The app repeatedly asks for Accessibility API permission even though it already has the permission. When I open the app, it prompts me to grant accessibility permission. Clicking the button takes me to the Accessibility menu. I've tried turning the permission on and off, clearing the cache, but nothing seems to resolve the issue.

I uninstalled and reinstalled the app from F-Droid, and that temporarily resolved the problem.

This issue only started occurring after having the app working for many months. I encountered the issue when I opened the app after it had been idle for some time.

Steps to Reproduce

  1. Open the app.
  2. App prompts for Accessibility API permission.
  3. Go to Accessibility settings and confirm permission is granted.
  4. Return to the app and see that it still prompts for permission.

Expected Behavior

The app should recognize that it has the Accessibility API permission and function normally without repeatedly asking for it.

Actual Behavior

The app continues to prompt for Accessibility API permission even though the permission is already granted.

Environment Details

Possible Solution

Uninstalling and reinstalling the app from F-Droid temporarily resolves the issue.

Additional Context

This issue was not present until recently, after the app had been functioning correctly for many months.

lochidev commented 2 months ago

Hi! What is the app version?

I don't think there is a bug in the app but who knows. This is out of my control unfortunately and it depends entirely on the OS.

When the app starts, it asks the OS whether accessibility service is turned on for the app. If the OS says yes, it's all good. Otherwise the UI will display that the accessibility service isn't turned on. If the user clicks the button that redirects them to accessibility service settings page, then the app exits. Then when the app is started again it checks if the service is on again.

Can you try and disable battery optimization and see if it fixes the issue?

Or maybe delete the app for a few days and then re-install again to see if that fixes things.