public interface IPoyntPrinterService
extends android.os.IInterface
AccessoryManagerService#getAccessoryProviders
to get all the
available printers in PoyntOS use AccessoryManagerService
Once you get list of printers as AccesoryProvider
you can directly connect to
the printer using this interface. Here's the code snippet
Intent intent = new Intent();
intent.setAction(AccessoryType.PRINTER);
intent.setClassName(accessoryProvider.getPackageName(),
accessoryProvider.getClassName());
context.bindService(intent,
connection, Context.BIND_AUTO_CREATE);
Modifier and Type | Interface and Description |
---|---|
static class |
IPoyntPrinterService.Stub
Local-side IPC implementation stub class.
|
Modifier and Type | Method and Description |
---|---|
void |
printJob(java.lang.String jobId,
android.graphics.Bitmap bitmap,
IPoyntPrinterServiceListener callback)
print a bitmap on to the printer accessory.
|
void |
printJobByName(java.lang.String printerName,
java.lang.String jobId,
android.graphics.Bitmap bitmap,
IPoyntPrinterServiceListener callback)
print a bitmap on to the printer accessory.
|
void |
printReceipt(java.lang.String jobId,
PrintedReceiptV2 printedReceipt,
IPoyntPrinterServiceListener callback,
android.os.Bundle options)
print a receipt on to the printer accessory.
|
void |
printReceiptForPrinter(java.lang.String printerName,
java.lang.String jobId,
PrintedReceiptV2 printedReceipt,
IPoyntPrinterServiceListener callback,
android.os.Bundle options)
print a bitmap on to the printer accessory.
|
void |
printReceiptJob(java.lang.String jobId,
PrintedReceipt printedReceipt,
IPoyntPrinterServiceListener callback)
print a receipt on to the printer accessory.
|
void |
printReceiptJobByName(java.lang.String printerName,
java.lang.String jobId,
PrintedReceipt printedReceipt,
IPoyntPrinterServiceListener callback)
print a bitmap on to the printer accessory.
|
void printJob(java.lang.String jobId, android.graphics.Bitmap bitmap, IPoyntPrinterServiceListener callback) throws android.os.RemoteException
jobId
- will be passed as a part of listener.bitmap
- Bitmap image to be printed.callback
- IPoyntCashDrawerServiceListener
android.os.RemoteException
void printReceiptJob(java.lang.String jobId, PrintedReceipt printedReceipt, IPoyntPrinterServiceListener callback) throws android.os.RemoteException
jobId
- will be passed as a part of listener.bitmap
- Bitmap image to be printed.callback
- IPoyntCashDrawerServiceListener
android.os.RemoteException
void printJobByName(java.lang.String printerName, java.lang.String jobId, android.graphics.Bitmap bitmap, IPoyntPrinterServiceListener callback) throws android.os.RemoteException
printerName:
- Name of the printer the receipt will be printed.jobId
- will be passed as a part of listener.bitmap
- Bitmap image to be printed.callback
- IPoyntCashDrawerServiceListener
android.os.RemoteException
void printReceiptJobByName(java.lang.String printerName, java.lang.String jobId, PrintedReceipt printedReceipt, IPoyntPrinterServiceListener callback) throws android.os.RemoteException
printerName:
- Name of the printer the receipt will be printed.jobId
- will be passed as a part of listener.bitmap
- Bitmap image to be printed.callback
- IPoyntCashDrawerServiceListener
android.os.RemoteException
void printReceipt(java.lang.String jobId, PrintedReceiptV2 printedReceipt, IPoyntPrinterServiceListener callback, android.os.Bundle options) throws android.os.RemoteException
jobId
- will be passed as a part of listener.PrintedReceiptV2
- printedReceipt to be printed.callback
- IPoyntCashDrawerServiceListener
options
- Bundleandroid.os.RemoteException
void printReceiptForPrinter(java.lang.String printerName, java.lang.String jobId, PrintedReceiptV2 printedReceipt, IPoyntPrinterServiceListener callback, android.os.Bundle options) throws android.os.RemoteException
printerName:
- Name of the printer the receipt will be printed.jobId
- will be passed as a part of listener.PrintedReceiptV2
- printedReceipt to be printed.callback
- IPoyntCashDrawerServiceListener
options
- Bundleandroid.os.RemoteException