Sdílet prostřednictvím


BatteryManager.ActionCharging Field

Definition

Sent when the device's battery has started charging (or has reached full charge and the device is on power).

[Android.Runtime.Register("ACTION_CHARGING", ApiSince=23)]
public const string ActionCharging;
[<Android.Runtime.Register("ACTION_CHARGING", ApiSince=23)>]
val mutable ActionCharging : string

Field Value

Attributes

Remarks

Sent when the device's battery has started charging (or has reached full charge and the device is on power). This is a good time to do work that you would like to avoid doing while on battery (that is to avoid draining the user's battery due to things they don't care enough about).

This is paired with #ACTION_DISCHARGING. The current state can always be retrieved with #isCharging().

Java documentation for android.os.BatteryManager.ACTION_CHARGING.

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