Ya está disponible la segunda Vista previa para desarrolladores de Android 11; pruébala y comparte tus comentarios.

CameraSelector

public final class CameraSelector
extends Object

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


A set of requirements and priorities used to select a camera.

Summary

Nested classes

class CameraSelector.Builder

Builder for a CameraSelector

Constants

int LENS_FACING_BACK

A camera on the device facing the opposite direction as the device's screen.

int LENS_FACING_FRONT

A camera on the device facing the same direction as the device's screen.

Fields

public static final CameraSelector DEFAULT_BACK_CAMERA

A static CameraSelector that selects the default back facing camera.

public static final CameraSelector DEFAULT_FRONT_CAMERA

A static CameraSelector that selects the default front facing camera.

Inherited methods

Constants

LENS_FACING_BACK

public static final int LENS_FACING_BACK

A camera on the device facing the opposite direction as the device's screen.

Constant Value: 1 (0x00000001)

LENS_FACING_FRONT

public static final int LENS_FACING_FRONT

A camera on the device facing the same direction as the device's screen.

Constant Value: 0 (0x00000000)

Fields

DEFAULT_BACK_CAMERA

public static final CameraSelector DEFAULT_BACK_CAMERA

A static CameraSelector that selects the default back facing camera.

DEFAULT_FRONT_CAMERA

public static final CameraSelector DEFAULT_FRONT_CAMERA

A static CameraSelector that selects the default front facing camera.