jhoogstraat / fast_barcode_scanner

A flutter plugin that allows your users to scan any type of barcode on iOS and Android
40 stars 64 forks source link

The scanner does not work the first time it is opened #27

Closed guilhermedaldim closed 3 years ago

guilhermedaldim commented 3 years ago

The reader only works after opening the player a second time.

Also, when opening the camera a second time with dispose = true, it is displayed "Camera is already initialized" and when exiting "Camera is not running" is displayed.

Both problems are occurring after the last changes to the package.

Thanks man!

renehw commented 3 years ago

Same problem here

allanwolski commented 3 years ago

Greate job @jhoogstraat!

This looks like the best barcode scanner package.

I have also received these errors with the latest version of the package. Also, I'm waiting for a new stable version to release an update of the app.

jhoogstraat commented 3 years ago

Thank you guys! I am always trying to make this package better and more stable.

Sorry for the problem that my latest commits have caused. The main branch should be stable, but the other branches are for development and can contain issues. I am back at the office tomorrow and will work on the package more the week coming.

I'm am always happy for feedback and contributions!

allanwolski commented 3 years ago

No problem man.

So I have to wait for the new features in 2.0.0 version. Let me know if you need help.

jhoogstraat commented 3 years ago

Please try the latest commit, I changed quite a bit.

@allanwolski I never developed for Android, so if there are any improvements to the native plugin, feel free to do a pr!

guilhermedaldim commented 3 years ago

Thanks man, your latest changes have greatly improved the plugin!

But I noticed that when using DetectionMode.pauseDetection the reader does not read the codes in sequence when calling resumeScanner. I managed with pauseCamera and resumeCamera, but the camera freeze.

jhoogstraat commented 3 years ago

What do you mean, codes are not read in sequence? As the name suggests pauseDetection will pause detecting barcodes, but keeps the camera running. This behavior does not change after calling resumeScanner.

If you want to scan multiple barcodes without stopping the camera in between, use continuous and ignore duplicates.

guilhermedaldim commented 3 years ago

The pauseDetection doesn't work, I really want to stop reading, but when calling resumeScanner nothing happens.

This was working in previous versions.

jhoogstraat commented 3 years ago

Which version are you using?

guilhermedaldim commented 3 years ago

I'm using the develop branch.

jhoogstraat commented 3 years ago

I guess you are using CameraController().pauseScanner and CameraController().resumeScanner().

I fixed an issue where resumeScanner() did not work on develop. Maybe that was it already.

guilhermedaldim commented 3 years ago

This solves the problem man!!

Thanks for the help!