moaazsidat / react-native-qrcode-scanner

A QR code scanner component for React Native.
MIT License
2.04k stars 517 forks source link

Keeps adding extra digit to Start/End of actual barcode if it's less than 13 numbers #390

Closed PouyaLitkouhi closed 2 years ago

PouyaLitkouhi commented 2 years ago

What's happening?

Everything works fine, but the scanner output has extra digits at the start and end of the actual barcode if it has less than 13 digits. is there a way to fix it to return just the exact same barcode? for instance if a barcoe is 123456789123 it will be 0123456789123 ( one extra 0 is added to start ) or if it is 12345678912 it will be 01234567891239 ( one extra 0 to start and one extra 9 to the end of the actual string)

PouyaLitkouhi commented 2 years ago

Looks like it's an iOS issue, it will add an extra zero to the start of ean13 barcode types. onBarCodeRead Explanation

sam9010 commented 1 year ago

@PouyaLitkouhi
how to get real data from type barcode ? my application has many barcode from any type(EAN_13,...) when i get barcode from e.data how handle it?( i mean get real "data" from "type")