2 years ago
#50119
noamicko
Google's Barcode reader doesn't read code_39 barcode correctly in android
I've implemented the google service barcode detector in my android app,some time ago. (part of the Mobile vision API). Untill now everything worked well. All of my customers are using a code_39 barcode type, and all of them have only numbers in their barcode values.
Recently, a new customer of mine started using the app - the problem is that he has also letters in his barcode stickers. For example:
m-108
For some reason, the barcodeDetector detects it as
+M-108
even when I tried defining the barcode type specifically (instead of Barcode.ALL_FORMATS)
barcodeDetector = new BarcodeDetector.Builder(this)
.setBarcodeFormats(Barcode.CODE_39)
.build();
It still doesn't recognize the barcode correctly (adding the plus sign, and reading lowercased m as uppercased m)
I tried to search this issue forever now, but couldn't find any clue.
I know that there are two types of code_39 - one of the is full ascii (which apreantly is my customer's using), but I can't find a way to define the barcodeDetector to treat it as full-ascii.
java
android
android-studio
google-play-services
barcode
0 Answers
Your Answer