Språk

SessionConfiguration.SetStateCallback Method

Definition

Set the state callback and executor.

[Android.Runtime.Register("setStateCallback", "(Ljava/util/concurrent/Executor;Landroid/hardware/camera2/CameraCaptureSession$StateCallback;)V", "", ApiSince=35)]
public void SetStateCallback(Java.Util.Concurrent.IExecutor executor, Android.Hardware.Camera2.CameraCaptureSession.StateCallback cb);
[<Android.Runtime.Register("setStateCallback", "(Ljava/util/concurrent/Executor;Landroid/hardware/camera2/CameraCaptureSession$StateCallback;)V", "", ApiSince=35)>]
member this.SetStateCallback : Java.Util.Concurrent.IExecutor * Android.Hardware.Camera2.CameraCaptureSession.StateCallback -> unit

Parameters

executor
IExecutor

The executor which should be used to invoke the callback. In general it is recommended that camera operations are not done on the main (UI) thread. 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.

cb
CameraCaptureSession.StateCallback

A state callback interface implementation. This value cannot be null.

Attributes

Remarks

Set the state callback and executor.

This function must be called for the SessionConfiguration object created via SessionConfiguration(int, List<OutputConfiguration>) before it's used to create a capture session.

Android reference for android.hardware.camera2.params.SessionConfiguration.setStateCallback.

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