OnImageSavedCallback

interface OnImageSavedCallback
androidx.camera.core.ImageCapture.OnImageSavedCallback

Listener containing callbacks for image file I/O events.

Summary

Public methods

abstract Unit
onError(imageCaptureError: Int, @NonNull message: String, @Nullable cause: Throwable?)

Called when an error occurs while attempting to save an image.

abstract Unit
onImageSaved(@NonNull file: File)

Called when an image has been successfully saved.

Public methods

onError

abstract fun onError(
    imageCaptureError: Int,
    @NonNull message: String,
    @Nullable cause: Throwable?
): Unit

Called when an error occurs while attempting to save an image.

Parameters
imageCaptureError Int: The type of error composed by CameraX
message String: The error message composed by CameraX
cause Throwable?: The throwable from lower-layer error

onImageSaved

abstract fun onImageSaved(@NonNull file: File): Unit

Called when an image has been successfully saved.

Parameters
file File: The file object which the image is saved to