jhoogstraat / fast_barcode_scanner

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

iOS pause / resume detector #45

Open jaumard opened 2 years ago

jaumard commented 2 years ago

Hey me again lol

I'm using continuous scanning, but when the barcode is not known, I'm pushing a new screen to register the product. So I want to pause the detection while the screen is on top of the scanner.

So I'm using await CameraController.instance.resumeDetector(); and await CameraController.instance.pauseDetector();

No issues on Android, but on iOS the detection is not paused at all.

jhoogstraat commented 2 years ago

You are using the continuous mode, I guess? If so, you are right and I'll fix this

Edit: Pushed 1.1.4 to fix this

jaumard commented 2 years ago

Thanks @jhoogstraat ! But now I have another issue ^^ it's that resumeDetector doesn't restart camera preview or detection at all on iOS.

PS: On Android the preview stays black after granting the permissions, but after a restart it all works well.

jaumard commented 2 years ago

After some digging that's not really what happen, I commented the pause and resume, and in fact the camera preview freezes anyway when it goes of screen and never starts again. :(

jaumard commented 2 years ago

Hey @jhoogstraat any idea what could go wrong?

jaumard commented 1 year ago

Little reminder on this one, we still have pretty annoying freeze or crash when we leave the stream and go back to it. Which make the scanner totally unusable on iOS

ikicodedev commented 1 year ago

Same issue with version 1.1.4 in iOS.