startPreview

CompletableFuture<VoidstartPreview(@NonNull() SurfaceHolder surfaceHolder)

Starts the preview using the given SurfaceHolder.

Note: the android.view.SurfaceView must have been created when starting the preview.

Return

a CompletableFuture that completes when the preview was started

Parameters

surfaceHolder

the SurfaceHolder for the camera preview android.view.SurfaceView

CompletableFuture<VoidstartPreview()

Starts the preview using the SurfaceHolder provided by startPreview.

This method has no effect, if no android.view.SurfaceHolder is available.