PowerManager.WakeLock.Acquire Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Acquire() |
Acquires the wake lock. |
Acquire(Int64) |
Acquires the wake lock with a timeout. |
Acquire()
Acquires the wake lock.
[Android.Runtime.Register("acquire", "()V", "GetAcquireHandler")]
public virtual void Acquire ();
[<Android.Runtime.Register("acquire", "()V", "GetAcquireHandler")>]
abstract member Acquire : unit -> unit
override this.Acquire : unit -> unit
- Attributes
Remarks
Acquires the wake lock.
Ensures that the device is on at the level requested when the wake lock was created.
Java documentation for android.os.PowerManager.WakeLock.acquire()
.
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
Acquire(Int64)
Acquires the wake lock with a timeout.
[Android.Runtime.Register("acquire", "(J)V", "GetAcquire_JHandler")]
public virtual void Acquire (long timeout);
[<Android.Runtime.Register("acquire", "(J)V", "GetAcquire_JHandler")>]
abstract member Acquire : int64 -> unit
override this.Acquire : int64 -> unit
Parameters
- timeout
- Int64
The timeout after which to release the wake lock, in milliseconds.
- Attributes
Remarks
Acquires the wake lock with a timeout.
Ensures that the device is on at the level requested when the wake lock was created. The lock will be released after the given timeout expires.
Java documentation for android.os.PowerManager.WakeLock.acquire(long)
.
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.