Partager via


PowerManager.NewWakeLock(WakeLockFlags, String) Method

Definition

Creates a new wake lock with the specified level and flags.

[Android.Runtime.Register("newWakeLock", "(ILjava/lang/String;)Landroid/os/PowerManager$WakeLock;", "GetNewWakeLock_ILjava_lang_String_Handler")]
public virtual Android.OS.PowerManager.WakeLock? NewWakeLock (Android.OS.WakeLockFlags levelAndFlags, string? tag);
[<Android.Runtime.Register("newWakeLock", "(ILjava/lang/String;)Landroid/os/PowerManager$WakeLock;", "GetNewWakeLock_ILjava_lang_String_Handler")>]
abstract member NewWakeLock : Android.OS.WakeLockFlags * string -> Android.OS.PowerManager.WakeLock
override this.NewWakeLock : Android.OS.WakeLockFlags * string -> Android.OS.PowerManager.WakeLock

Parameters

levelAndFlags
WakeLockFlags

Combination of wake lock level and flag values defining the requested behavior of the WakeLock.

tag
String

Your class name (or other tag) for debugging purposes.

Returns

Attributes

Remarks

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