ekreutz / react-native-barcode-scanner-google

Barcode scanner for react native, which implements barcode detection from Google's Vision API.
MIT License
113 stars 68 forks source link

Code_39 Barcode scan miss last character #34

Open vmary2014 opened 5 years ago

vmary2014 commented 5 years ago

Hi I'm not sure if we missed something but: If we scan a CODE_128 barcode it works fine and returns all the digits as expected However a CODE_39 barcode invariably misses the last digit of the code We've tried different lengths of barcodes, the maximum being 17 characters, but the issue occurs with all the Code_39 we have scanned. Has anyone faced this issue at all? Is there a setting to set? Thanks Vincent

jsancho commented 5 years ago

here's an example of a barcode that will be scanned with the last digit missing.

https://www.barcodesinc.com/generator/image.php?code=SJNTAAE12U1006970&style=197&type=C128B&width=271&height=50&xres=1&font=3

Louies89 commented 5 years ago

@vmary2014 @jsancho use com.google.android.gms:play-services-vision:11.4.0 in build.gradle it detects the above barcode link properly

vmary2014 commented 5 years ago

@Louies89 Thanks but now another error occurs in the view (Using React Native 0.55.4):

Error: Attempted to RESUME barcode scanner before scanner view was instantiated. at createErrorFromErrorData (blob:http://localhos…2-2a7db7dd8efb:2041) at blob:http://localhos…2-2a7db7dd8efb:1993 at MessageQueue.invokeCallback (blob:http://localhos…2-2a7db7dd8efb:2435) at blob:http://localhos…2-2a7db7dd8efb:2180 at MessageQueue.guardSafe (blob:http://localhos…2-2a7db7dd8efb:2348) at MessageQueue.invokeCallbackAndReturnFlushedQueue (blob:http://localhos…2-2a7db7dd8efb:2179) at debuggerWorker.js:70

We had the issue above before and that's why we used the 'com.google.android.gms:play-services-vision:15.0.2' as suggested in #29

I tried with the latest version (16.2.0) but CODE_39 is still decoded incorrectly.

Louies89 commented 5 years ago

Post your code here, Can take a look into it...