Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to invoke OnImageCaptured #121

Open
dharamhbtik opened this issue Dec 20, 2024 · 1 comment
Open

How to invoke OnImageCaptured #121

dharamhbtik opened this issue Dec 20, 2024 · 1 comment

Comments

@dharamhbtik
Copy link

dharamhbtik commented Dec 20, 2024

I was trying to use this library to scan barcode as well as to capture images. I can see there is event for the camera view which actually captures the image but I can't see any method exposed which will trigger this event.

I have added cameraview and a button to capture image.

As per the documentation
I am setting the CaptureNextFrame = true on click of the button in Main Thread but OnImageCaptured is never getting called.
In the latest release note it is written as
OnImageCaptured is now triggered AFTER OnDetectionFinished and only if BarcodeResults.Count > 0

So looks like this library is only for scanning. We cannot use it as Camera for taking pics?

@afriscic
Copy link
Owner

Hello.

You need to set CaptureNextFrame to true and then next time when the barcode(s) is detected it will fire OnDetectionFinished with barcode data first and OnImageCaptured with the frame image after.

Note that after OnImageCaptured returns CaptureNextFrame will be set to false so you need to set it to true if you want to capture additional images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants