startPreview

@UiThread
open fun startPreview(@NonNull context: Context, @NonNull factorySettings: CameraSettings, @NonNull cameraStartupCallback: ICameraManager.CameraStartupCallback)

This method should be called on resuming the activity. It will reopen camera, restart focus and accelerometer management and prepare camera callbacks. Implementations should take care if multiple startPreview calls are issued to ignore all but first.

Parameters

context

Context object required to determine phone information.

factorySettings

Camera factory settings required to rebuild camera strategy.

cameraStartupCallback

Callback that will receive all events from camera thread while preview is being started