In CamEx2 the Camera2 PreviewTaken (Image As Object) event is commented:
I tried uncommenting the Sub, but the event never happens:
The other preview event "PreviewCaptureComplete" happens very often:
I'm planning to change my app from useing Camera to Camera2 library. My app use the old camera library's event Preview (Data() As Byte) to examine the preview picture by code, so now I'm playing with the CamEx2 to understand how it could be done.
How can I make the PreviewTaken event to happen?
B4X:
'Private Sub Camera_PreviewTaken (Image As Object)
' Log(Image)
'End Sub
I tried uncommenting the Sub, but the event never happens:
B4X:
Private Sub Camera_PreviewTaken (Image As Object)
Log("PreviewTaken")
End Sub
The other preview event "PreviewCaptureComplete" happens very often:
B4X:
Private Sub Camera_PreviewCaptureComplete (CaptureResult As Object)
FocusState = IntToConst(GetFromCaptureResult(CaptureResult, "CONTROL_AF_STATE"), AF_STATE)
Log("PreviewCaptureComplete")
'Log(IntToConst(GetFromCaptureResult(CaptureResult, "FLASH_STATE"), FLASH_STATE))
'PrintAllKeys(CaptureResult, "Capture Result")
End Sub
I'm planning to change my app from useing Camera to Camera2 library. My app use the old camera library's event Preview (Data() As Byte) to examine the preview picture by code, so now I'm playing with the CamEx2 to understand how it could be done.
How can I make the PreviewTaken event to happen?
Last edited: