Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.
Click to show internal directories.
Click to hide internal directories.