Join us for ⁠#Android11: The Beta Launch Show on June 3!

CameraSelector.Builder

public static final class CameraSelector.Builder
extends Object

java.lang.Object
   ↳ androidx.camera.core.CameraSelector.Builder


Builder for a CameraSelector.

Summary

Public constructors

Builder()

Public methods

CameraSelector build()

Builds the CameraSelector.

CameraSelector.Builder requireLensFacing(int lensFacing)

Requires a camera with the specified lens facing.

Inherited methods

Public constructors

Builder

public Builder ()

Public methods

build

public CameraSelector build ()

Builds the CameraSelector.

Returns
CameraSelector

requireLensFacing

public CameraSelector.Builder requireLensFacing (int lensFacing)

Requires a camera with the specified lens facing.

If lens facing is already set, this will add extra requirement for lens facing instead of replacing the previous setting.

Parameters
lensFacing int

Returns
CameraSelector.Builder