keymapperorg / KeyMapper

An Android app that change what the buttons do on your devices!
http://docs.keymapper.club
GNU General Public License v3.0
1.25k stars 164 forks source link

[Bug]: Accessibility service disables when stop service triggered #1300

Closed HusniMuhammad closed 1 month ago

HusniMuhammad commented 2 months ago

Developer TODO (don't remove)

Discord message link/email recipient

Describe the bug [Bug]: Accessibility service disables when app service stops

To Reproduce Open the app, click stop service, again open the app

Expected behavior Don't ask again and again (Remembering accessibility permission)

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information)

Additional context Add any other context about the problem here.

sds100 commented 1 month ago

Hi, is this not intended behaviour? If you stop the service then it should turn off

HusniMuhammad commented 1 month ago

No other apps like termux, Nova launcher don't behave this way for accessibility permission

sds100 commented 1 month ago

That is because they don't rely on the accessibility service for the entire app to work. You can still open Key Mapper even if the service is stopped

HusniMuhammad commented 1 month ago

Termux,Nova launcher are also don't rely on the accessibility service for the entire app to work

sds100 commented 1 month ago

I don't understand what the issue is, can you create a screen recording?

HusniMuhammad commented 1 month ago

I don't understand what the issue is, can you create a screen recording?

https://github.com/user-attachments/assets/e5687492-0fb9-4891-a4d0-ad165ad2b33e

sds100 commented 1 month ago

Ah, I see. Thats because you created an action shortcut. Because in Key Mapper some actions require the accessibility service and some don't i just made it so that you can only execute actions if you have it turned on. I don't see why you need to turn the service off, it doesnt affect battery life or anything - even though some phones say they do.

HusniMuhammad commented 1 month ago

Short period of time it's don't affect battery standup time, running this app in for entire cycle of battery for small sequence of actions & for low processing devices can kill process for out of memory issues. Other apps treat this issue (remembering accessibility permission) very differently

This scenario is like every time browser asking for internet to work even if data is turn on

HusniMuhammad commented 1 month ago

Is it possible to solve this issue? for me it's really helpful. Please consider :)

kms2302 commented 1 month ago

I'd also find it helpful

sds100 commented 1 month ago

Sorry but this isn't going to be implemented. I suggest using an app like Automate or Tasker to do this instead. Key Mapper is designed for key mapping and not home screen shortcuts which is why it assumes you always want the accessibility service running, to break that assumption means I need to redo quite a bit of code.