react-native-vision-camera icon indicating copy to clipboard operation
react-native-vision-camera copied to clipboard

Add UPC-A support

Open Gambitboy opened this issue 1 year ago • 2 comments

What

This PR adds support for UPC-A barcode format.

Changes

This PR adds the UPC-A type format to React Native, CodeType to Android and iOS, but points to EAN13 in iOS as Apple states it supports UPC-A through EAN13 here.

Tested on

Samsung S22 iPhone X

Related issues

Fixes #2118

Gambitboy avatar Feb 15 '24 11:02 Gambitboy

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-vision-camera ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2024 3:54pm

vercel[bot] avatar Feb 15 '24 11:02 vercel[bot]

I made these code changes to my app months ago, didn't test this specific PR yet can confirm by tomorrow on the 2 devices stated in the PR.

Gambitboy avatar Feb 15 '24 11:02 Gambitboy

Also, why is this PR still a Draft?

mrousavy avatar Feb 23 '24 18:02 mrousavy

I forgot to undraft it.

Gambitboy avatar Feb 23 '24 19:02 Gambitboy

@mrousavy Do you think it would be worth adding a middle layer where if iOS asked for ean vs upc_a we do the conversion for them?

Gambitboy avatar Feb 23 '24 19:02 Gambitboy

@mrousavy Do you think it would be worth adding a middle layer where if iOS asked for ean vs upc_a we do the conversion for them?

no.

I'm thinking whether it would be better to make upc-a Android only, so it's the users job to explicitly use ean-13 on iOS instead - then there'd be no confusion once the user read the docs....

mrousavy avatar Feb 26 '24 08:02 mrousavy

Can we also then add that iOS supports upc-a through ean-13 but they user will need to manually handle that case. Just so people know, might prevent future tickets being opened.

Gambitboy avatar Feb 26 '24 09:02 Gambitboy

I've added some documentation on this issue at the bottom of the CodeScanning doc.

Gambitboy avatar Mar 12 '24 15:03 Gambitboy

I've made the adjustments

Gambitboy avatar Mar 12 '24 15:03 Gambitboy

Cool, thanks for your PR I think with the docs this makes sense.

If the PR goes green we can merge! :)

mrousavy avatar Mar 12 '24 16:03 mrousavy

@mrousavy is this all good to merge?

Gambitboy avatar Mar 18 '24 13:03 Gambitboy

Ah, thanks for the ping, yes - LGTM - thank you for your contribution! ❤️

mrousavy avatar Mar 18 '24 14:03 mrousavy

Hey @mrousavy Any plans to release a version update with UPC-A any time soon?

orenagiv avatar Mar 24 '24 20:03 orenagiv

Hey - I think this is released in V4 beta!

mrousavy avatar Mar 25 '24 09:03 mrousavy