Package-level declarations

Types

Link copied to clipboard
class WakeLock

The WakeLock interface of the Screen Wake Lock API can be used to request a lock that prevents device screens from dimming or locking when an application needs to keep running. Available only in secure contexts.

Link copied to clipboard

The WakeLockSentinel interface of the Screen Wake Lock API can be used to monitor the status of the platform screen wake lock, and manually release the lock when needed. Available only in secure contexts.

Link copied to clipboard
sealed interface WakeLockType

Functions

Link copied to clipboard
inline suspend fun WakeLockSentinel.release()

The release() method of the WakeLockSentinel interface releases the WakeLockSentinel, returning a Promise that is resolved once the sentinel has been successfully released.

Link copied to clipboard
inline suspend fun WakeLock.request(): WakeLockSentinel
inline suspend fun WakeLock.request(type: WakeLockType): WakeLockSentinel

The request() method of the WakeLock interface returns a Promise that fulfills with a WakeLockSentinel object if the system screen wake lock is granted.