Udostępnij za pośrednictwem


PowerManager.IsDeviceIdleMode Property

Definition

Returns true if the device is currently in idle mode.

public virtual bool IsDeviceIdleMode { [Android.Runtime.Register("isDeviceIdleMode", "()Z", "GetIsDeviceIdleModeHandler", ApiSince=23)] get; }
[<get: Android.Runtime.Register("isDeviceIdleMode", "()Z", "GetIsDeviceIdleModeHandler", ApiSince=23)>]
member this.IsDeviceIdleMode : bool

Property Value

Returns true if currently in active device idle mode, else false. This is when idle mode restrictions are being actively applied; it will return false if the device is in a long-term idle mode but currently running a maintenance window where restrictions have been lifted.

Attributes

Remarks

Returns true if the device is currently in idle mode. This happens when a device has been sitting unused and unmoving for a sufficiently long period of time, so that it decides to go into a lower power-use state. This may involve things like turning off network access to apps. You can monitor for changes to this state with #ACTION_DEVICE_IDLE_MODE_CHANGED.

Java documentation for android.os.PowerManager.isDeviceIdleMode().

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