You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Activate KeepAwake with two different tags -> device stays on
Deactivate only one tag -> device will go to sleep after a while
Re-active that tag -> device will go to sleep after a while
Deactivate all tags -> device will go to sleep after a while
Re-active one or multiple tags -> device stays on
When turning on keepAwake with two or more different tags and then turning off only one the device will go to sleep after a while. KeepAwake can then only be activated again by first turning it of for all tags and then turning one (or multiple) on.
Expected Behavior
The device should not sleep while there is at least one tag active (as is the behavior on iOS)
Actual Behavior
Deactivating a keepAwake tag will enable the device to sleep even if there are other tags still trying to keep the device awake. It is impossible to reactive the keepAwake functionality until all tags are deactivated first.
Glancing at the source code on Android it will always turn off the keepAwake functionality, even if there are tags left:
馃悰 Bug Report
Environment
SDK 35 on Android
Steps to Reproduce
When turning on keepAwake with two or more different tags and then turning off only one the device will go to sleep after a while. KeepAwake can then only be activated again by first turning it of for all tags and then turning one (or multiple) on.
Expected Behavior
The device should not sleep while there is at least one tag active (as is the behavior on iOS)
Actual Behavior
Deactivating a keepAwake tag will enable the device to sleep even if there are other tags still trying to keep the device awake. It is impossible to reactive the keepAwake functionality until all tags are deactivated first.
Glancing at the source code on Android it will always turn off the keepAwake functionality, even if there are tags left:
expo/packages/expo-keep-awake/android/src/main/java/expo/modules/keepawake/ExpoKeepAwakeManager.java
Lines 52 to 54 in acbacf4
But when there are already tags on the list it won't turn on the keepAwake functionality:
expo/packages/expo-keep-awake/android/src/main/java/expo/modules/keepawake/ExpoKeepAwakeManager.java
Lines 40 to 44 in acbacf4
iOS checks this by using a
shouldBeActive
functionReproducible Demo
Use this Snack on Android
The text was updated successfully, but these errors were encountered: