CameraPreviewCallbacks

Interface for receiving camera preview lifecycle events.

This interface provides callbacks for camera preview state changes, enabling tracking of when the camera preview becomes active or inactive.

Functions

Link copied to clipboard
abstract fun onCameraPreviewStarted()

Called when the camera preview begins streaming. This function is invoked when the camera preview successfully starts displaying live camera frames. It indicates that the camera is active and ready for user interaction.

Link copied to clipboard
abstract fun onCameraPreviewStopped()

Called when the camera preview stops streaming. This function is invoked when the camera preview stops displaying frames, typically when the camera is released, the app goes to background, or during camera configuration changes.