For some reason there is no support for the torch feature in CamEx2. Add this Sub to CamEx2 (v1.31) to have a torch:
B4X:
Public Sub setTorch(pbolOn As Boolean, pbolVideoRecording As Boolean)
SetBothMaps("FLASH_MODE", FLASH_MODE.IndexOf(IIf(pbolOn, "TORCH", "OFF")))
StartPreview(TaskIndex, pbolVideoRecording)
End Sub