FlashMode

public abstract @interface FlashMode
implements Annotation

androidx.camera.core.FlashMode


The flash mode options when taking a picture using ImageCapture.

Applications can check if there is a flash unit via CameraInfo.hasFlashUnit() and update UI component if necessary. If there is no flash unit, then the FlashMode set to ImageCapture.setFlashMode(int) will take no effect for the subsequent photo capture requests and they will act like OFF.

When the torch is enabled via CameraControl.enableTorch(boolean), the torch will remain enabled during photo capture regardless of flash mode setting. When the torch is disabled, flash will function as specified by ImageCapture.setFlashMode(int).

Summary

Constants

int AUTO

Auto flash.

int OFF

No flash.

int ON

Always flash.

Inherited methods

Constants

AUTO

public static final int AUTO

Auto flash. The flash will be used according to the camera system's determination when taking a picture.

Constant Value: 0 (0x00000000)

OFF

public static final int OFF

No flash. The flash will never be used when taking a picture.

Constant Value: 2 (0x00000002)

ON

public static final int ON

Always flash. The flash will always be used when taking a picture.

Constant Value: 1 (0x00000001)