CameraDevice.Close Method

Definition

Close the connection to this camera device as quickly as possible.

[Android.Runtime.Register("close", "()V", "GetCloseHandler")]
public abstract void Close ();
[<Android.Runtime.Register("close", "()V", "GetCloseHandler")>]
abstract member Close : unit -> unit

Implements

Attributes

Remarks

Close the connection to this camera device as quickly as possible.

Immediately after this call, all calls to the camera device or active session interface will throw a IllegalStateException, except for calls to close(). Once the device has fully shut down, the StateCallback#onClosed callback will be called, and the camera is free to be re-opened.

Immediately after this call, besides the final StateCallback#onClosed calls, no further callbacks from the device or the active session will occur, and any remaining submitted capture requests will be discarded, as if CameraCaptureSession#abortCaptures had been called, except that no success or failure callbacks will be invoked.

Java documentation for android.hardware.camera2.CameraDevice.close().

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