Udostępnij za pośrednictwem


PowerManager.WakeUp(Int64) Method

Definition

Forces the android.view.Display#DEFAULT_DISPLAY_GROUP default display group to turn on.

[Android.Runtime.Register("wakeUp", "(J)V", "GetWakeUp_JHandler")]
public virtual void WakeUp (long time);
[<Android.Runtime.Register("wakeUp", "(J)V", "GetWakeUp_JHandler")>]
abstract member WakeUp : int64 -> unit
override this.WakeUp : int64 -> unit

Parameters

time
Int64

The time when the request to wake up was issued, in the SystemClock#uptimeMillis() time base. This timestamp is used to correctly order the wake up request with other power management functions. It should be set to the timestamp of the input event that caused the request to wake up.

Attributes

Remarks

Forces the android.view.Display#DEFAULT_DISPLAY_GROUP default display group to turn on.

If the android.view.Display#DEFAULT_DISPLAY_GROUP default display group is turned off it will be turned on. Additionally, if the device is asleep it will be awoken. If the android.view.Display#DEFAULT_DISPLAY_GROUP default display group is already on then nothing will happen.

This is what happens when the power key is pressed to turn on the screen.

Requires the android.Manifest.permission#DEVICE_POWER permission.

This member is deprecated. Use #wakeUp(long, int, String) instead.

Java documentation for android.os.PowerManager.wakeUp(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.

Applies to

See also

  • <xref:Android.OS.PowerManager.UserActivity(System.Int64%2c+System.Boolean)>
  • GoToSleep(Int64)