Smile, it’s CameraX! [analysis and extensions] | Analysis - enable/disable the torch
val cameraControl = camera.cameraControl | |
val cameraInfo = camera.cameraInfo | |
cameraInfo.torchState.observe(this, Observer { state -> | |
if (state == TorchState.ON) { | |
// state on | |
} else { | |
// state off | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment