Keep Awake
HMSSDK's setAlwaysScreenOn
method allows you to toggle always screen on mode which prevents the screen from turning off automatically.
This can be useful in scenarios where you want to keep the screen active constantly, such as during video playback.
await hmsInstance.setAlwaysScreenOn(true);
When the always screen on mode is enabled, it prevents the device screen from turning off automatically due to inactivity.
🔑 Note: Enabling always screen on can have an impact on the device's battery life as it keeps the screen active even when not in use. Make sure to use this feature judiciously and consider disabling it when no longer needed.
Have a suggestion? Recommend changes ->