I'm currently developing an application with the Zebra Android SDK and facing a challenge in determining when a print job has completed on a Zebra printer. I am using the latest version of the Zebra Android SDK.
I attempted to use the sendAndWaitForResponse method in conjunction with the ^HV ZPL command, hoping to receive a "finished" response or similar indication when the print job completes.
However, I didn't receive the expected response. The response was always empty or not indicative of the print job's completion. I suspect this might be due to the specifications of my printer, which operates based on the guidelines provided in Volume One of the ZPL manual. It's possible that the ^HV command or the way I'm using it isn't compatible or sufficient for detecting the end of a print job in my specific scenario.
~HScommand. You will have to poll the printer using the command. Its return values can be parsed to show current printer status. Specifically, theuuuuuuuu - labels remaining in batchfield will go to zero when the label has been printed. You can also use~HSto determine if it is "safe" to send a print job by inspecting the error flags like ribbon out, paper out, head up, etc.~HSreply does not have a unique terminator, It is simply three lines of text, with each line prefixed with\x02and ending with\x03\r\n. Not familiar with the android sdk, but can you send the command, then receive the three lines individually? Most network libraries have "sendline" and "recvline" style interfaces.