Is there a way to prevent screen locking on Android?
I have a mobile VR app in the Play Store where the screen locks after three minutes. This requires the user to remove their phone from the headset to unlock the app.
I’m calling: Screen.sleepTimeout = SleepTimeout.NeverSleep; In Awake() in every scene. I’ve also tried calling it every frame in Update(). Nothing prevents screen locking.
Is there a solid way to prevent screen locking on Android? The device is ignoring our request to stay alive without touch input.
Unity 2021.2.13f
Target API Level: Android 11
Min API level: Android 9