PowerManager class

This class gives you control of the power state of the device.

See: https://developer.android.com/reference/android/os/PowerManager

Constructors

PowerManager()

Properties

hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Constants

ACQUIRE_CAUSES_WAKEUP → const int
Wake lock flag: Turn the screen on when the wake lock is acquired. [...]
268435456
ACTION_DEVICE_IDLE_MODE_CHANGED → const String
Intent that is broadcast when the state of isDeviceIdleMode() changes. [...]
"android.os.action.DEVICE_IDLE_MODE_CHANGED"
ACTION_POWER_SAVE_MODE_CHANGED → const String
Intent that is broadcast when the state of isPowerSaveMode() changes. [...]
"android.os.action.POWER_SAVE_MODE_CHANGED"
LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF → const int
All location providers should be disabled when battery saver is on and the device is non-interactive. [...]
2
LOCATION_MODE_FOREGROUND_ONLY → const int
In this mode, all the location providers will be kept available, but location fixes should only be provided to foreground apps. [...]
3
LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF → const int
In this mode, the GPS based location provider should be disabled when battery saver is on and the device is non-interactive. [...]
1
LOCATION_MODE_NO_CHANGE → const int
Either the location providers shouldn't be affected by battery saver, or battery saver is off. [...]
0
ON_AFTER_RELEASE → const int
Wake lock flag: When this wake lock is released, poke the user activity timer so the screen stays on for a little longer. [...]
536870912
PARTIAL_WAKE_LOCK → const int
Wake lock level: Ensures that the CPU is running; the screen and keyboard backlight will be allowed to go off. [...]
1
PROXIMITY_SCREEN_OFF_WAKE_LOCK → const int
Wake lock level: Turns the screen off when the proximity sensor activates. [...]
32
RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY → const int
Flag for WakeLock#release WakeLock.release(int): Defer releasing a PROXIMITY_SCREEN_OFF_WAKE_LOCK wake lock until the proximity sensor indicates that an object is not in close proximity. [...]
1