zxing-android-embedded icon indicating copy to clipboard operation
zxing-android-embedded copied to clipboard

How to add UPC E & UPC A barcode filter in DecoratedBarcodeView?

Open mahendran92 opened this issue 5 years ago • 2 comments

Is this the right way? But the below code isn't working.

Collection<BarcodeFormat> formats = Arrays.asList(BarcodeFormat.UPC_A); barcodeViewNew.getBarcodeView().setDecoderFactory(new DefaultDecoderFactory(formats));

Thanks

mahendran92 avatar Dec 12 '19 06:12 mahendran92

I'm having the same issue with 9319110de8927fb4771b928eaf795e43999d8529.

challgren avatar Dec 12 '19 15:12 challgren

My guess is the following lines are the culprits because calling decode(BinaryBitmap) cause the hints to be set to null.

https://github.com/journeyapps/zxing-android-embedded/blob/master/zxing-android-embedded/src/com/journeyapps/barcodescanner/Decoder.java#L77

If you use the default MultiFormatReader() the setting of formats works correctly.

challgren avatar Dec 12 '19 15:12 challgren