CameraCaptureCallback
@RequiresApi(21) abstract class CameraCaptureCallback
kotlin.Any | |
↳ | androidx.camera.core.impl.CameraCaptureCallback |
A callback object for tracking the progress of a capture request submitted to the camera device. Once one of the methods is called, other methods won't be called again on the same instance.
Summary
Public constructors | |
---|---|
A callback object for tracking the progress of a capture request submitted to the camera device. |
Public methods | |
---|---|
open Unit |
This method is called when the capture request was not submitted to camera device. |
open Unit |
onCaptureCompleted(@NonNull cameraCaptureResult: CameraCaptureResult) This method is called when an image capture has fully completed and all the result metadata is available. |
open Unit |
onCaptureFailed(@NonNull failure: CameraCaptureFailure) This method is called instead of |
Public constructors
CameraCaptureCallback
CameraCaptureCallback()
A callback object for tracking the progress of a capture request submitted to the camera device. Once one of the methods is called, other methods won't be called again on the same instance.
Public methods
onCaptureCancelled
open fun onCaptureCancelled(): Unit
This method is called when the capture request was not submitted to camera device. For Example, requests are cancelled when it is in an inappropriate state (such as closed). After onCaptureCancelled is called, other methods won't be called.
onCaptureCompleted
open fun onCaptureCompleted(@NonNull cameraCaptureResult: CameraCaptureResult): Unit
This method is called when an image capture has fully completed and all the result metadata is available.
Parameters | |
---|---|
cameraCaptureResult |
CameraCaptureResult: The output metadata from the capture. |
onCaptureFailed
open fun onCaptureFailed(@NonNull failure: CameraCaptureFailure): Unit
This method is called instead of onCaptureCompleted
when the camera device failed to produce a CameraCaptureResult
for the request.
Parameters | |
---|---|
failure |
CameraCaptureFailure: The output failure from the capture, including the failure reason. |