DisplayRequest
public class DisplayRequest : IDisplayRequestSupported platforms
Example
public void Initialize()
{
this.displayRequest = new DisplayRequest(this.Activity.Window);
try
{
// This call activates a display-required request. If successful,
// the screen is guaranteed not to turn off automatically due to user inactivity.
this.displayRequest.RequestActive();
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine(ex.ToString());
}
// Perform long-running application initialization.
try
{
// This call de-activates the display-required request. If successful, the screen
// might be turned off automatically due to a user inactivity, depending on the
// power policy settings of the system.
this.displayRequest.RequestRelease();
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine(ex.ToString());
}
}Constructors
DisplayRequest(Android.Views.Window) - Android
Parameters
Properties
Originator - Android
Originator - Windows
Methods
RequestActive()
RequestRelease()
Last updated