Lingua

CameraManager.RegisterAvailabilityCallback Method

Definition

Overloads

Name Description
RegisterAvailabilityCallback(CameraManager+AvailabilityCallback, Handler)

Register a callback to be notified about camera device availability.

RegisterAvailabilityCallback(IExecutor, CameraManager+AvailabilityCallback)

Register a callback to be notified about camera device availability.

RegisterAvailabilityCallback(CameraManager+AvailabilityCallback, Handler)

Register a callback to be notified about camera device availability.

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

Parameters

callback
CameraManager.AvailabilityCallback

the new callback to send camera availability notices 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

Exceptions

if the handler is null but the current thread has no looper.

Remarks

Java documentation for android.hardware.camera2.CameraManager.registerAvailabilityCallback(android.hardware.camera2.AvailabilityCallback, 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

RegisterAvailabilityCallback(IExecutor, CameraManager+AvailabilityCallback)

Register a callback to be notified about camera device availability.

[Android.Runtime.Register("registerAvailabilityCallback", "(Ljava/util/concurrent/Executor;Landroid/hardware/camera2/CameraManager$AvailabilityCallback;)V", "", ApiSince=28)]
public void RegisterAvailabilityCallback(Java.Util.Concurrent.IExecutor executor, Android.Hardware.Camera2.CameraManager.AvailabilityCallback callback);
[<Android.Runtime.Register("registerAvailabilityCallback", "(Ljava/util/concurrent/Executor;Landroid/hardware/camera2/CameraManager$AvailabilityCallback;)V", "", ApiSince=28)>]
member this.RegisterAvailabilityCallback : Java.Util.Concurrent.IExecutor * Android.Hardware.Camera2.CameraManager.AvailabilityCallback -> 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.AvailabilityCallback

the new callback to send camera availability notices to

Attributes

Remarks

Register a callback to be notified about camera device availability.

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

Note: If the order between some availability callbacks matters, the implementation of the executor should handle those callbacks in the same thread to maintain the callbacks' order.

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

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