Comment #4 on issue 112 by sro...@gmail.com: Add list of barcode formats to
Intent-invoked scanning on Android
http://code.google.com/p/zxing/issues/detail?id=112
OK time to fix this one, patch attached for consideration.
Attachments:
Issue_112.patch 12.2 KB
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Comment #5 on issue 112 by sro...@gmail.com: Add list of barcode formats to
Intent-invoked scanning on Android
http://code.google.com/p/zxing/issues/detail?id=112
You now have an Intent extra called SCAN_FORMATS which can contain
something like
"EAN_8,EAN_13" to manually specify the formats to scan. The old method
still works.
Haven't tried it yet but looks like a good job. Just what was needed. Well
done!
Hi guys,
putExtra("SCAN_FORMATS", stringDesiredBarcodeFormats);
doesn't seem to be working for me in BarcodeScanner3.21b1 or
BarcodeScanner3.2.
I am trying to scan "UPC_A" or "UPC_A,UPC_E", but in both cases it is still
scanning
EAN_13. It also scanned UPC_A and EAN_13 when I had specified "QR_CODE".
I haven't
really tried other combinations of code types as I have a limited number of
samples
to work with. "SCAN_MODE" does work because when I use "QR_CODE_MODE" it
can't scan
either of UPC_A or EAN_13, so I think it is maybe a problem
with "SCAN_FORMATS"? Or
maybe I am doing something wrong.
I am planning on adding the option for the user to specify which code types
that they
want to scan to my project http://code.google.com/p/android-pcbcr.
Regards,
Brad
I don't have my system setup to debug the BarcodeScanner code, but I think
I may see
what the problem is. I think that the 'parseDecodeFormats(Intent intent)'
method in
'CaptureActivity.java' is missing a 'return formats;' line after the for
loop...looks
like it will always return null for "SCAN_FORMATS".
Good eye, I committed that fix.
Looks like it is working now in v3.22, thanks.