setTorchState

fun setTorchState(on: Boolean, @NonNull successCallback: SuccessCallback)

Turns the torch on the camera on or off. Returns true on success, false on failure.

Parameters

on

If true, torch will be turned on, if false, torch will be turned off.

successCallback

callback that will receive information if torch was successfully put in desired state