capacitor-community / barcode-scanner

A fast and efficient (QR) barcode scanner for Capacitor
MIT License
437 stars 169 forks source link

Define scanner position #184

Closed phillipplum closed 1 year ago

phillipplum commented 1 year ago

Is your feature request related to a problem? Please describe. We don't want to show the camera full screen, but e.g. only in the upper area of the app, so that the result of the scan can already be displayed below the camera. But scanning is only done in the middle.

Describe the solution you'd like Use Options to define the area of the scan.

Describe alternatives you've considered nothing yet

Additional context

thegnuu commented 1 year ago

This is currently not possible and won't be implemented in the current version.

I will release a new version based on MLKit soon, in which we should be able to allow things like this.

Unfortunately I currently have no ETA for this update, I was hoping to find some time to finish it over the holidays, but I was not able to work on it until now....

svmashok commented 1 year ago

@thegnuu

Any possibility or scan setting options to show the scan region? Because if a page contains more than one QR code, and if we scan it then now it randomly scanned the QR code. We are not sure which QR code has been scanned,

So if we show the scan region and if we pointed to any QR code then it will be easy to pointed out.

thegnuu commented 1 year ago

@svmashok This will not be possible with the current implementation as mentioned above.

We are still working on the ml-kit implementation, the progress is slow but steady, and most of the essential functions are already working. I am currently working on a way, to return the position of the scanned codes within the dom, this will allow devs to decide if a code is in a "scannable" area and should help you resolve your issue...

Unfortunately, there is still no ETA.

svmashok commented 1 year ago

Thanks for the update @thegnuu

If any plan in the future to show the QR code scan area/region, then it will be grateful to us. Thanks in advance :)

thegnuu commented 1 year ago

I just release v5 as a pre-release. There is another issue #217 that once fixed should allow you to only "read" scans in a specific area. Of course it will read all codes, but you can only accept codes in this area :)

I will close this for now, please check the progress on the other issue.