public interface IAppsService extends IInterface
Intent serviceIntent = new Intent(AppsIntent.ACTION_APPS_SERVICE);
serviceIntent.putExtra(Intents.EXTRA_ACCOUNT, CloverAccount.getAccount(context));
serviceIntent.putExtra(Intents.EXTRA_VERSION, 1);
context.bindService(serviceIntent);
For more information about bound services, refer to
the Android documentation:
Bound Services
.
You may also interact with the merchant service through the
AppsConnector
class, which handles binding and
asynchronous invocation of service methods.
AppsConnector
Modifier and Type | Interface and Description |
---|---|
static class |
IAppsService.Default
Default implementation for IAppsService.
|
static class |
IAppsService.Stub
Local-side IPC implementation stub class.
|
Modifier and Type | Method and Description |
---|---|
App |
getApp(ResultStatus resultStatus)
Get App object with information about this app.
|
AppBillingInfo |
getAppBillingInfo(ResultStatus resultStatus)
Get AppBillingInfo object with billing information for the merchant running this app.
|
void |
logMetered(String meteredId,
int numberOfEvent,
ResultStatus resultStatus)
Log a metered event occurance.
|
void |
setSmartReceiptText(String text,
ResultStatus resultStatus)
Update the Smart Receipt text for this app.
|
void |
setSmartReceiptUrl(String url,
ResultStatus resultStatus)
Update the Smart Receipt URL for this app.
|
asBinder
App getApp(ResultStatus resultStatus) throws RemoteException
resultStatus
- an output parameter with the result of the operationRemoteException
void logMetered(String meteredId, int numberOfEvent, ResultStatus resultStatus) throws RemoteException
meteredId
- the id of the meter option to lognumberOfEvent
- the count of how many events occuredresultStatus
- an output parameter with the result of the operationRemoteException
AppBillingInfo getAppBillingInfo(ResultStatus resultStatus) throws RemoteException
resultStatus
- an output parameter with the result of the operationRemoteException
void setSmartReceiptText(String text, ResultStatus resultStatus) throws RemoteException
text
- the text to display on the receiptresultStatus
- an output parameter with the result of the operationRemoteException
void setSmartReceiptUrl(String url, ResultStatus resultStatus) throws RemoteException
text
- the URL to be used on the receiptresultStatus
- an output parameter with the result of the operationRemoteException