private Sub FlashEstado(LightOn As Boolean) As ResumableSub
Try
Estado = B4XFlash.Value
cam.AutoExposureMode = IIf(LightOn, "ON","OFF")
cam.PreviewSettingsMap.Put("FLASH_MODE", IIf(LightOn,2,0)) 'TORCH
cam.StartPreview(MyTaskIndex, VideoMode)
cam.AutoExposureMode = IIf(LightOn, "ON","OFF")
cam.PreviewSettingsMap.Put("FLASH_MODE", IIf(LightOn,2,0)) 'TORCH
cam.StartPreview(MyTaskIndex, VideoMode)
Return True
Catch
Log(LastException)
Return False
End Try
End Sub
End Sub