public interface IReceiptRegistrationService extends IInterface
register(Uri,ResultStatus)
method to register the URI of a content provider
that will provide receipt data. Said content provider must conform to the
ReceiptContract
contract.
Intent serviceIntent = new Intent(PrinterIntent.ACTION_RECEIPT_REGISTRATION);
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
.
ReceiptRegistrationConnector
class, which handles binding and
asynchronous invocation of service methods.Modifier and Type | Interface and Description |
---|---|
static class |
IReceiptRegistrationService.Default
Default implementation for IReceiptRegistrationService.
|
static class |
IReceiptRegistrationService.Stub
Local-side IPC implementation stub class.
|
Modifier and Type | Method and Description |
---|---|
List<ReceiptRegistration> |
getRegistrations(ResultStatus resultStatus) |
void |
register(Uri uri,
ResultStatus resultStatus) |
void |
unregister(Uri uri,
ResultStatus resultStatus) |
asBinder
void register(Uri uri, ResultStatus resultStatus) throws RemoteException
RemoteException
void unregister(Uri uri, ResultStatus resultStatus) throws RemoteException
RemoteException
List<ReceiptRegistration> getRegistrations(ResultStatus resultStatus) throws RemoteException
RemoteException