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

Pause Service on Screen Off #28

Open
NitishGadangi opened this issue Oct 1, 2020 · 2 comments
Open

Pause Service on Screen Off #28

NitishGadangi opened this issue Oct 1, 2020 · 2 comments
Labels
feature-request requesting a new feature

Comments

@NitishGadangi
Copy link
Owner

I think it not necessary to keep the service running even when the Screen is Off.

Notes
WakeLock can be used to implement this

@NitishGadangi NitishGadangi added the feature-request requesting a new feature label Oct 1, 2020
@HristianIliev
Copy link

I can try and implement this.

@HristianIliev
Copy link

From what I have read this is not possible. From Android documentation:

The lifecycle of an accessibility service is **managed exclusively by the system** and follows the established service life cycle. Starting an accessibility service is triggered exclusively by the user explicitly turning the service on in device settings. After the system binds to a service, it calls onServiceConnected(). This method can be overriden by clients that want to perform post binding setup.

An accessibility service stops either when the user turns it off in device settings or when it calls disableSelf() (In Android 7.0 (API 24) and later).

From the upper documentation it seems like it is not possible to manage the lifecycle of an accessibility service.

@HristianIliev HristianIliev removed their assignment Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request requesting a new feature
Projects
None yet
Development

No branches or pull requests

2 participants