LocationPowerSaveMode Enum

Definition

Defines location power save mode values used by the Android OS API.

public enum LocationPowerSaveMode
type LocationPowerSaveMode = 
Inheritance
LocationPowerSaveMode

Fields

Name Value Description
NoChange 0

Either the location providers shouldn't be affected by battery saver, or battery saver is off.

GpsDisabledWhenScreenOff 1

In this mode, the GPS based location provider should be disabled when battery saver is on and the device is non-interactive.

AllDisabledWhenScreenOff 2

All location providers should be disabled when battery saver is on and the device is non-interactive.

ForegroundOnly 3

In this mode, all the location providers will be kept available, but location fixes should only be provided to foreground apps.

ThrottleRequestsWhenScreenOff 4

In this mode, location will not be turned off, but LocationManager will throttle all requests to providers when the device is non-interactive.

Remarks

This class lets you query and request control of aspects of the device's power state.

Java documentation for android.os.PowerManager.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to