PowerManager.IsIgnoringBatteryOptimizations(String) Method

Definition

Return whether the given application package name is on the device's power allowlist.

[Android.Runtime.Register("isIgnoringBatteryOptimizations", "(Ljava/lang/String;)Z", "GetIsIgnoringBatteryOptimizations_Ljava_lang_String_Handler", ApiSince=23)]
public virtual bool IsIgnoringBatteryOptimizations (string? packageName);
[<Android.Runtime.Register("isIgnoringBatteryOptimizations", "(Ljava/lang/String;)Z", "GetIsIgnoringBatteryOptimizations_Ljava_lang_String_Handler", ApiSince=23)>]
abstract member IsIgnoringBatteryOptimizations : string -> bool
override this.IsIgnoringBatteryOptimizations : string -> bool

Parameters

packageName
String

Returns

Boolean
Attributes

Remarks

Java documentation for android.os.PowerManager.isIgnoringBatteryOptimizations(java.lang.String).

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