capacitor-community / barcode-scanner

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

Capacitor 6 version of the plugin #303

Closed Dante1349 closed 1 month ago

Dante1349 commented 4 months ago

Hi, we are currently updating to capacitor 6 and we rely on the barcode scanner plugin, but at the moment the peer depencies of this plugin point to capacitor 5, it would be awesome if you could provide an updated version.

JanMisker commented 4 months ago

As described in the README this package is deprecated. I suggest you have a look at @capacitor-mlkit/barcode-scanning

Dante1349 commented 4 months ago

@JanMisker oh thank you, I was checking the wrong package.json, my fault. sorry. But thank you for your fast response. Btw is there a migration guide maybe?

mariomurrent-softwaresolutions commented 3 months ago

@JanMisker oh thank you, I was checking the wrong package.json, my fault. sorry. But thank you for your fast response. Btw is there a migration guide maybe?

Did you already migrate?

Dante1349 commented 3 months ago

@mariomurrent-softwaresolutions yes we already migrated, but now we have problems with older devices because thaey cannot download the google barcode scanner. So its still ongoing more or less

mariomurrent-softwaresolutions commented 3 months ago

Okay, how old are the devices? Thx for the information

thegnuu commented 3 months ago

@mariomurrent-softwaresolutions ml-kit should support android devices >= Android API level 21 and basically every 64-bit iOS device, starting with iPhone 6 on iOS 10.

On Android there are multiple ways of using ml-kit, bundled or unbundled. When using unbundled the models will be downloaded via Google Play. As far as I am aware @capacitor-mlkit/barcode-scanning always bundles the deps, which should technically not causing those issues. @Dante1349 you might have to open an issue over there if the requirements are met and you are running into issues... I never had any issues, but we support only newer devices anyway.

Dante1349 commented 3 months ago

@thegnuu it does not seem like the google barcode scanner is bundled, the device that i was testing had android 9 and this is what i get:

image
robingenz commented 3 months ago

@Dante1349 This only affects the scan() method. This uses the Google Code Scanner, which is not available on some devices. You can simply use the startScan() method. You then have to take care of the UI yourself, but the method is available on all devices.

Dante1349 commented 3 months ago

@robingenz thank you i didn't check the documentation carefully enough, my bad. The plugin works great now, thank you very much.

DanielMi commented 1 month ago

As described in the README this package is deprecated. I suggest you have a look at @capacitor-mlkit/barcode-scanning

Sadly this double the APK size of my app (from 12MB to 24MB), without having more functionality - that's simply a NO-GO. Do you have other libraries you could suggest? I loved this barcode-scanner so much, which was pretty stable and lightweight.

thegnuu commented 1 month ago

@DanielMi

We decided to deprecate this library since we already started to update this library to ML-Kit as well and working on two libraries that basically did the same thing did not seem to be ideal. Unfortunately I currently have no time to work on this project and there were no active maintainers other than me.

If there is anyone out there that is willing to maintain this package as is you can reach out to me and I will try to point you to the right channels to get the proper access.

Dante1349 commented 1 month ago

@DanielMi you could fork the plugin and just increase the capacitor peer dependency version in the package.json. If you're lucky there aren't any breaking changes.

Dante1349 commented 1 month ago

Problem won't be fixed, plugin is not maintained anymore, use: https://github.com/capawesome-team/capacitor-mlkit/tree/main/packages/barcode-scanning