richtr / NoSleep.js

Prevent display sleep and enable wake lock in any Android or iOS web browser.
MIT License
2.19k stars 379 forks source link

NoSleep.js works but on Android devices it corrupts the execution of certain functions #140

Open paulaegido opened 2 years ago

paulaegido commented 2 years ago

Expected Behavior

By logging into the app, you access the Firestore to upload certain data and calculate various parameters. These same functions are executed after completing actions in the app.

Actual Behavior

It doesn't access certain values properly only on Android devices, so the graphs that show the data load everything to 0, but no error is displayed on the console and I don't know what it could be related to.

Code

Confidential

How Do We Reproduce?

I think it may be related to the CPU on Android devices going into a 'sleep' state to save battery life and causing certain functions to not run properly. I don't know if this state can be avoided and always remain active. On iOS devices, in Safari and Chrome on desktop, everything works perfectly.