wakelock

package
v0.10.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Release

func Release() error

func Request

func Request(typeName string) error

func SetProvider

func SetProvider(p Provider)

Types

type Provider

type Provider interface {
	// Request acquires a wake lock. typeName is "screen" (keep the display
	// on, the web WakeLock API semantic) or "system" (prevent sleep only).
	Request(typeName string) error
	Release() error
}

Provider is a native wake-lock backend. On mobile the shell registers one via SetProvider (e.g. FLAG_KEEP_SCREEN_ON / isIdleTimerDisabled); on desktop the built-in platform implementation is used when no provider is set.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL