-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Allow apps to block screen locking/screensaver #4534
Comments
Why should it be mobile specific? I think something similar would be very useful for some kinds of applications on desktop as well |
Oh I guess I didn't think about it, is screen lock blocking an api that exists on desktop? Most of my PCs I use without auto locking and auto screen dimming so I really just didn't think of it. I'll give a looksee tomorrow if these features exist on desktops and how |
Any video player is usually a good example of inhibiting the screen from sleeping/locking :) |
Okay, looks like mac is the same is ios, so that's easy enough. Linux gives Windows has |
Cool. Thanks for looking up support. Linux is probably not that simple though. We need a solution that works on both X11 and on Wayland but it's probably not a huge problem. I think the XDG Portal API might have something for it |
Okay took a little finding (their docs are messy imo) but looks like the XDG portal equivalent is |
Thanks. Yeah, I should probably have attached that link to my previous message. I'm the one that has implemented the portal APIs on our Should probably not be too hard to hook up support for that one as well :) |
iOS and Android are on that PR :) |
Desktop support now added too, this will be in v2.5.0 |
Checklist
Is your feature request related to a problem?
I was thinking of building a mobile monitoring app, and wanted the screen to remain on while the app is running.
I looked into it and there are simple native APIs for it.
On iOS you can call
(Thanks Andy for finding this, I only found the Swift API)
On Android it's split into two options, either keep screen on or keep CPU running, not entirely sure we need the latter and the former doesn't require permissions:
https://developer.android.com/develop/background-work/background-tasks/scheduling/wakelock
It looks like there's also a C version of this code but I could only find mention of it and not the API itself.
Is it possible to construct a solution with the existing API?
No response
Describe the solution you'd like to see.
I think probably just add to the mobile driver API a method that calls the native APIs, preferably something that can be set and reset, so you can keep screen on for specific long lasting tasks and let it lock otherwise
The text was updated successfully, but these errors were encountered: