nativescript-community / insomnia

:sleepy: NativeScript plugin to keep the device awake (not dim the screen, lock, etc)
41 stars 11 forks source link

Still Sleeping after period of time #8

Open LorenDorez opened 6 years ago

LorenDorez commented 6 years ago

@EddyVerbruggen

I know why you added the code to check for foreground activity to keepawake or sleep when the app is not active but for me this defeats the whole purpose of the plugin. Can we either revert back to the older version or add a flag to disable this activity check?

LorenDorez commented 6 years ago

Looks like im still running the older version and getting reports that after a while the phone is still sleeping.

EddyVerbruggen commented 6 years ago

Care to share a repo and steps to reproduce this?

LorenDorez commented 6 years ago

working on that. Just getting enough reports if it that hard to say its just 1 user manually turning off the screen. Do you know if there is anything on Android that would override the flag "FLAG_KEEP_SCREEN_ON" ?

EddyVerbruggen commented 6 years ago

No. I'm also interested to learn if you think this is specific to a version.

LorenDorez commented 6 years ago

Im running tests right now but the users say that it happens about 30+mins or so of inactivity and they are also switching between apps constantly som im going to run through a battery of tests and let you know what i find if anything

EddyVerbruggen commented 6 years ago

OK. The expected behaviour is that if your app is in the foreground and you use keepAwake, then the screen should not dim (and eventually lock the phone).

LorenDorez commented 6 years ago

thats what im am trying to confirm if it slept on my app or another one.