La Vista previa para desarrolladores de Android 11 ya está disponible. Pruébala y comparte tus comentarios.

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

CameraSelector.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

CameraSelector.Builder

public CameraSelector.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