public interface IPrinterService extends IInterface
com.clover.sdk.v1.printer.job
package. To open a cash
drawer connected to a Clover printer, use the CashDrawer
class.
To interact with the Clover print queue, use the PrintQueue
class.
Intent serviceIntent = new Intent(PrinterIntent.ACTION_PRINTER_SERVICE);
serviceIntent.putExtra(PrinterIntent.EXTRA_ACCOUNT, CloverAccount.getAccount(context));
serviceIntent.putExtra(PrinterIntent.EXTRA_VERSION, 1);
context.bindService(serviceIntent);
For more information about bound services, refer to
the Android documentation:
Bound Services
.
PrinterConnector
class, which handles binding and
asynchronous invocation of service methods.PrinterIntent
,
CloverAccount
,
PrinterConnector
Modifier and Type | Interface and Description |
---|---|
static class |
IPrinterService.Default
Default implementation for IPrinterService.
|
static class |
IPrinterService.Stub
Local-side IPC implementation stub class.
|
Modifier and Type | Method and Description |
---|---|
Printer |
getPrinterById(String id,
ResultStatus status)
Returns the printer which matches the
Printer.getUuid() if any, or null if none. |
List<Printer> |
getPrinters(ResultStatus status)
Get all configured printers for this merchant.
|
List<Printer> |
getPrintersByCategory(Category category,
ResultStatus status)
Get all printers configured by this merchant for the given category.
|
TypeDetails |
getPrinterTypeDetails(Printer p,
ResultStatus status)
Returns the TypeDetails for the given printer.
|
boolean |
isPrinterSet(Category category,
ResultStatus status)
Returns true if there is any configured printer in the given category.
|
void |
removePrinter(Printer p,
ResultStatus status)
Removes a printer from being configured.
|
Printer |
setPrinter(Printer p,
ResultStatus status)
Adds a printer optionally with a category.
|
asBinder
List<Printer> getPrinters(ResultStatus status) throws RemoteException
RemoteException
List<Printer> getPrintersByCategory(Category category, ResultStatus status) throws RemoteException
RemoteException
boolean isPrinterSet(Category category, ResultStatus status) throws RemoteException
RemoteException
Printer getPrinterById(String id, ResultStatus status) throws RemoteException
Printer.getUuid()
if any, or null if none.
This may return a printer which has not been configured.RemoteException
void removePrinter(Printer p, ResultStatus status) throws RemoteException
RemoteException
Printer setPrinter(Printer p, ResultStatus status) throws RemoteException
RemoteException
TypeDetails getPrinterTypeDetails(Printer p, ResultStatus status) throws RemoteException
RemoteException