The second Android 11 Developer Preview is now available, test it out and share your feedback.

TorchState

public class TorchState
extends Object

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


The camera flash torch state.

Summary

Constants

int OFF

Torch is off.

int ON

Torch is on.

Inherited methods

Constants

OFF

public static final int OFF

Torch is off.

Constant Value: 0 (0x00000000)

ON

public static final int ON

Torch is on.

Constant Value: 1 (0x00000001)