Skip to content

Commit

Permalink
Flutter/wakelock (#1704)
Browse files Browse the repository at this point in the history
* Added wakelock docs

* Added wakelock docs

* Update docs/flutter/v2/how-to-guides/set-up-video-conferencing/always-screen-on.mdx

Co-authored-by: Saikat Mitra <[email protected]>

* Added Suggested changes

---------

Co-authored-by: Saikat Mitra <[email protected]>
  • Loading branch information
Decoder07 and saikatmitra91 authored Aug 3, 2023
1 parent db2a31d commit 588763b
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Wakelock
nav: 4.11
---

HMSSDK's `toggleAlwaysScreenOn` method allows you to toggle `always screen on` mode which prevents the screen from turning off automatically.
When the `always screen on` mode is enabled, it prevents the device screen from turning off automatically due to inactivity. This can be useful in scenarios where you want to keep the screen active constantly, such as during video playback.

> 🔑 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.
Let's see how to enable and disable the "always screen on" mode.

```dart
/// Enables or disables the "always screen on" mode.
void toggleAlwaysScreenOn() {
hmsSDK.toggleAlwaysScreenOn();
}
```

1 comment on commit 588763b

@vercel
Copy link

@vercel vercel bot commented on 588763b Aug 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.