Sdílet prostřednictvím


CameraCaptureSession.StateCallback.OnClosed(CameraCaptureSession) Method

Definition

This method is called when the session is closed.

[Android.Runtime.Register("onClosed", "(Landroid/hardware/camera2/CameraCaptureSession;)V", "GetOnClosed_Landroid_hardware_camera2_CameraCaptureSession_Handler")]
public virtual void OnClosed (Android.Hardware.Camera2.CameraCaptureSession session);
[<Android.Runtime.Register("onClosed", "(Landroid/hardware/camera2/CameraCaptureSession;)V", "GetOnClosed_Landroid_hardware_camera2_CameraCaptureSession_Handler")>]
abstract member OnClosed : Android.Hardware.Camera2.CameraCaptureSession -> unit
override this.OnClosed : Android.Hardware.Camera2.CameraCaptureSession -> unit

Parameters

session
CameraCaptureSession

the session returned by #onConfigured

Attributes

Remarks

This method is called when the session is closed.

A session is closed when a new session is created by the parent camera device, or when the parent camera device is closed (either by the user closing the device, or due to a camera device disconnection or fatal error).

Once a session is closed, all methods on it will throw an IllegalStateException, and any repeating requests or bursts are stopped (as if #stopRepeating() was called). However, any in-progress capture requests submitted to the session will be completed as normal.

Java documentation for android.hardware.camera2.CameraCaptureSession.StateCallback.onClosed(android.hardware.camera2.CameraCaptureSession).

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