Lingua

CameraManager.RegisterTorchCallback Method

Definition

Overloads

Name Description
RegisterTorchCallback(CameraManager+TorchCallback, Handler)

Register a callback to be notified about torch mode status.

RegisterTorchCallback(IExecutor, CameraManager+TorchCallback)

Register a callback to be notified about torch mode status.

RegisterTorchCallback(CameraManager+TorchCallback, Handler)

Register a callback to be notified about torch mode status.

[Android.Runtime.Register("registerTorchCallback", "(Landroid/hardware/camera2/CameraManager$TorchCallback;Landroid/os/Handler;)V", "", ApiSince=23)]
public void RegisterTorchCallback(Android.Hardware.Camera2.CameraManager.TorchCallback callback, Android.OS.Handler? handler);
[<Android.Runtime.Register("registerTorchCallback", "(Landroid/hardware/camera2/CameraManager$TorchCallback;Landroid/os/Handler;)V", "", ApiSince=23)>]
member this.RegisterTorchCallback : Android.Hardware.Camera2.CameraManager.TorchCallback * Android.OS.Handler -> unit

Parameters

callback
CameraManager.TorchCallback

The new callback to send torch mode status to

handler
Handler

The handler on which the callback should be invoked, or null to use the current thread's android.os.Looper looper.

Attributes

Remarks

Java documentation for android.hardware.camera2.CameraManager.registerTorchCallback(android.hardware.camera2.TorchCallback, android.os.Handler).

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

RegisterTorchCallback(IExecutor, CameraManager+TorchCallback)

Register a callback to be notified about torch mode status.

[Android.Runtime.Register("registerTorchCallback", "(Ljava/util/concurrent/Executor;Landroid/hardware/camera2/CameraManager$TorchCallback;)V", "", ApiSince=28)]
public void RegisterTorchCallback(Java.Util.Concurrent.IExecutor executor, Android.Hardware.Camera2.CameraManager.TorchCallback callback);
[<Android.Runtime.Register("registerTorchCallback", "(Ljava/util/concurrent/Executor;Landroid/hardware/camera2/CameraManager$TorchCallback;)V", "", ApiSince=28)>]
member this.RegisterTorchCallback : Java.Util.Concurrent.IExecutor * Android.Hardware.Camera2.CameraManager.TorchCallback -> unit

Parameters

executor
IExecutor

The executor which will be used to invoke the callback. 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
CameraManager.TorchCallback

The new callback to send torch mode status to

Attributes

Remarks

Register a callback to be notified about torch mode status.

The behavior of this method matches that of registerTorchCallback(TorchCallback,Handler), except that it uses Executor as an argument instead of Handler.

Android reference for android.hardware.camera2.CameraManager.registerTorchCallback.

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