api_pos_printer 0.1.2
api_pos_printer: ^0.1.2 copied to clipboard
Flutter plugin for the integrated thermal printer on Android POS terminals. Drives iPosPrinter and Sunmi InnerPrinter services via AIDL with auto backend detection.
0.1.2 #
- Fix:
printerSetAlignmentis at txn 6 (not 7) andprinterPrintBlankLines(int lines, int height, callback)is at txn 8 (notprinterSetTextStyle). The OEM's iPos AIDL has been rebuilt from parameter names recovered from theLzyHardWareManagerproxy stub. All confirmed transaction codes (1, 6, 8, 10, 11, 15, 18) now match exactly. - All async iPos AIDL methods now return
void(matching the OEM stub which writes onlyreadException()after each transaction). - iPos backend now reuses a single long-lived
IPosPrinterCallbackstub for the lifetime of the connection (the OEM service appears to fire results on the most recently registered callback rather than the per-call parameter). Defaults typeface to"ST"to match the original LzyHardWareManager flow. printBitmap/printBarcode/printRawnow throwUnsupportedOperationExceptionon iPos backend — these aren't exposed by this OEM's service. Sunmi still supports them.feedPaper(dots)on iPos is now mapped toprinterPrintBlankLines(1, dots, callback).
0.1.1 #
- Fix: realigned the iPos AIDL with the OEM service's transaction codes
(
getPrinterVersion()was speculatively included at txn 6, shifting every later method by one). Confirmed-against-smali codes 1, 6, 8, 10, 11, 15, 18 now match exactly. printerSetTextStylesimplified to the 2-int variant (textSize,alignment) actually exposed by these devices.- New
printerPrintTextAIDL entry (txn 10) for the simpler text-print variant; full-formatprintSpecFormatTextstays at txn 11. getFirmwareVersion()now returnsnull(not exposed by this OEM AIDL).IposBackend.callWithCallbacknow propagates the underlyingRemoteExceptioninstead of swallowing it asfalse, and includes the operation name in the log/error message.
0.1.0 #
- Initial release.
- Backend
ipos(com.iposprinter.iposprinterservice) — full feature support: status, init, self-check, alignment, text style, text/columns, bitmap, barcode, QR code, raw bytes, feed, perform-print. - Backend
sunmi(woyou.aidlservice.jiuiv5) — text, columns, bitmap, barcode, QR, raw, line-wrap. - Auto-detection of installed backend.
- Status
EventChannelexposing iPos broadcasts (PAPERLESS,BUSY,THP_HIGHTEMP,MOTOR_HIGHTEMP,NORMAL).