I'm trying to read various GS1-128 barcodes using a Unitech EA630 and several other Unitech models in an Android Kotlin app. I have attached to the intents "unitech.scanservice.data" and "unitech.scanservice.dataall" and am extracting the extras "text", or "text", "datalength", and "databyte" in the case of "dataall". So far, I haven't found a way for the Unitech scan service to output the FNC1 or GS characters. I understand these are typically non-printable characters, but shouldn't they be visible in the "databyte" bytearray? Unfortunately, I have barcodes structured like "<FNC1>10109A1172E<FNC1>17240918", which I've confirmed using for example "IDAutomation" software. However, the output in the "databyte" bytearray is always:
intent.getByteArrayExtra("databyte") [49, 48, 49, 48, 57, 65, 49, 49, 55, 50, 69, 49, 55, 50, 52, 48, 57, 49, 56] 10109A1172E17240918
The Unitech Android Programming Guide states Note: "databyte" will return unmodified raw data from the engine
Given that this barcode doesn't have a variable-length field at the end, I'm puzzled about how to parse it without the FNC1. The scanner surely recognizes the FNC1, but I can't access it. Does anyone have tips or experience with Unitech devices? As a workaround, I could set a pipe "|" as the "GS 128 Character before AI" in the Unitech Scanservice, which would make the output look like:
|10109A1172E|17240918
But this seems more like a workaround rather than the correct method to handle it. Unfortunately, I haven't received any response from Unitech support on this issue.