Language

IWindowManager.RegisterDisplayEngagementModeCallback Method

Definition

Registers a callback for display engagement mode changes.

[Android.Runtime.Register("registerDisplayEngagementModeCallback", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetRegisterDisplayEngagementModeCallback_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler:Android.Views.IWindowManager, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=37)]
public virtual void RegisterDisplayEngagementModeCallback(Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer callback);
[<Android.Runtime.Register("registerDisplayEngagementModeCallback", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetRegisterDisplayEngagementModeCallback_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler:Android.Views.IWindowManager, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=37)>]
abstract member RegisterDisplayEngagementModeCallback : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
override this.RegisterDisplayEngagementModeCallback : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit

Parameters

executor
IExecutor

The executor to run the callback on. This value cannot be null. Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). Otherwise, provide an Executor that dispatches to an appropriate thread.

callback
IConsumer

The callback to register. This value cannot be null.

Attributes

Remarks

Registers a callback for display engagement mode changes. The callback will be invoked with the latest engagement mode flags upon registration. If the specified callback instance is already registered, this call does nothing.

Android reference for android.view.WindowManager.registerDisplayEngagementModeCallback.

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