Android Question Why in CameraEX ... ?

aeropic

Active Member
Licensed User
Longtime User
Hi Erel,

Reading the code of CameraEx example, I wonder why the btnFlash_Click routine starts with some getfocus lines ?

B4X:
Sub btnFlash_Click
    'Dim f() As Float = camEx.GetFocusDistances   '<<<<<<<<<<<<<<<< USELESS ?
    'Log(f(0) & ", " & f(1) & ", " & f(2))                 ' <<<<<<<<<<<<<<<<< USELESS ?
    Dim flashModes As List = camEx.GetSupportedFlashModes
    If flashModes.IsInitialized = False Then
        ToastMessageShow("Flash not supported.", False)
        Return
    End If
    Dim flash As String = flashModes.Get((flashModes.IndexOf(camEx.GetFlashMode) + 1) Mod flashModes.Size)
    camEx.SetFlashMode(flash)
    ToastMessageShow(flash, False)
    camEx.CommitParameters   
End Sub

I commented them and it seems to work as well as before ...
 
Top