2013-12-31

Without changing any ZXing source code, is there a way to output control codes in a barcode using ZXing on Android?

Edit: The reason that I don't want to edit source code is because I would like to use the "scan via intent" process. If I have to edit source, then I'll have to embed the entire project into my project instead.

For instance, I have a GS1-128 barcode that currently outputs text 21417341123. I would instead like to see something like [Start C][FNC1]21417341123[Stop].

If I can get the raw data from the scan, that would also be OK. But the "rawBytes" value is only for the data (21417341123 portion) and doesn't include the control codes. I saw the question ZXing Result.getRawBytes(), what exactly is it?, but the solution to use getByteArrayExtra("SCAN_RESULT_BYTE_SEGMENTS_0"); returns null.

If it is not possible to do this without changing code, then I will need to modify the ZXing source. I am just trying to see if I can do what I want without modifying source.

Show more