Add built-in printer service integration guide for OEMs#2
Open
rvs-godaddy wants to merge 3 commits intogdcorp-commerce:masterfrom
Open
Add built-in printer service integration guide for OEMs#2rvs-godaddy wants to merge 3 commits intogdcorp-commerce:masterfrom
rvs-godaddy wants to merge 3 commits intogdcorp-commerce:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a sample built-in printer service and a practical integration guide for OEM partners. It shows how to wire an in-device (built-in) printer to Poynt OS via
IPoyntPrinterService, how to convert receipts to printable bitmaps, and how to map OEM printer result codes to the standardized Poynt printer error codes expected by apps.What’s included
com.sample.printer.BuiltinPrinterServiceimplementingIPoyntPrinterServiceBitmapPrintedReceipt(v1) andPrintedReceiptV2(v2) to printableBitmap(OEMs can use the provided helpers; no custom renderer required)IPoyntPrinterServiceListenerprintImageBitmap(...)with your printer SDK’s init/print/feed/finish callsPrintedReceiptandPrintedReceiptV2Files changed
app/src/main/java/com/sample/printer/BuiltinPrinterService.java(new/updated): sample implementation and inline guidanceapp/src/main/AndroidManifest.xml: declaresBuiltinPrinterServicewithco.poynt.os.services.v1.IPoyntPrinterServiceintent-filterHow OEMs should integrate
printImageBitmap(jobId, bitmap, listener)BitmapPrintedReceipt/PrintedReceiptV2to aBitmap(or provide your own renderer if desired)printImageBitmap(...)with the rendered bitmaphandlePrintResultWithListener(...)listenerfor success/failure appropriatelybitmap == nulland provide meaningful failure callbacksError mapping guidance
Map your OEM statuses to the public Poynt printer error codes. Example categories:
This ensures consistent behavior for POS apps relying on
IPoyntPrinterServiceListener.Backward compatibility