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
iOS Wakelock does not avoid dimming screen #172
Comments
Hi @danielefolatelli - thanks for using the plugin. Did you follow the advice from the README? (https://github.com/creativecreatorormaybenot/wakelock/blob/main/wakelock/README.md#calling-wakelockenable-in-main)
|
Hi, thanks for your reply. Yes I followed this advice I call wakelock.enable outside of main.
Daniele Folatelli
Creator and Developer Time To Count
… On 17 Apr 2022, at 16:14, creativecreatorormaybenot ***@***.***> wrote:
Hi @danielefolatelli - thanks for using the plugin. Did you follow the advice from the README? (https://github.com/creativecreatorormaybenot/wakelock/blob/main/wakelock/README.md#calling-wakelockenable-in-main)
Calling Wakelock.enable() in main()
As touched on in the previous paragraph, calling Wakelock.enable() in your main() function is
not the best approach for a number of reasons.
The most important factors are:
Users expect their screen to automatically turn off unless e.g. a video is playing.
It is unlikely that your whole app requires the screen to always stay on.
The wakelock can be released by external sources at any time (e.g. by the OS).
Only calling Wakelock.enable() once will most likely mean that the screen turns off at one
point or another anyway.
This is why you should instead prefer to enable the wakelock whenever components inside of your app
that require the screen to stay on are active. This can e.g. happen in the build method of your
widget.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
@danielefolatelli Can you call |
I will soon discontinue this repository. Please use wakelock_plus: ^1.1.6 instead. |
Hi, mi app is a game where players have to think for a while. So sometimes they are meditating and not interacting at all. I only have timers running at the time. I added the wakelock.enabled command after installing the plugin but I see that the screen dims and then closes according to the time set in the AutoLock field in Display and Brightness for the iOS device.
Is it not the plugins mission to avoid the screen from dimming?
The text was updated successfully, but these errors were encountered: