public final class ReceiptContract extends Object
IReceiptRegistrationService.register(android.net.Uri, com.clover.sdk.v1.ResultStatus)
method.
Such a content provider must support either the
ReceiptContract.Text.CONTENT_TYPE
or ReceiptContract.Image.CONTENT_TYPE
content type. If it supports the ReceiptContract.Text.CONTENT_TYPE
content type, it must implement
ContentProvider.query(android.net.Uri, String[], String, String[], String)
method, and the returned cursor must must contain the columns defined by the ReceiptContract.Text
class. If the content provider supports the ReceiptContract.Image.CONTENT_TYPE
content type,
it must implement the
ContentProvider.openFile(android.net.Uri, String)
method, and the returned file descriptor value must either:
BitmapFactory.decodeStream(java.io.InputStream)
.
For example, it can be a PNG, GIF, or JPG encoded file.
PARAM_*
query parameters
listed below. This may be used as input to other Clover
services to obtain additional information about the order, the customer, etc.
Registered content providers have a maximum of 2 seconds to return receipt data from their
content provider. It is advisable to stay well below this limit. You must not perform
long-running tasks such as network I/O.IReceiptRegistrationService
,
ContentProvider
Modifier and Type | Class and Description |
---|---|
static class |
ReceiptContract.Image |
static class |
ReceiptContract.Text |
static interface |
ReceiptContract.TextColumns
Column name for returning text-only receipt data.
|
Modifier and Type | Field and Description |
---|---|
static String |
PARAM_ACCOUNT_NAME
The Clover account that is printing the receipt.
|
static String |
PARAM_ACCOUNT_TYPE
The Clover account type is printing the receipt.
|
static String |
PARAM_FLAGS
The print flags.
|
static String |
PARAM_MERCHANT_ID
The merchant ID.
|
static String |
PARAM_ORDER_ID
The order ID of the receipt to be printed.
|
static String |
PARAM_RECEIPT_WIDTH
The receipt width
|
Constructor and Description |
---|
ReceiptContract() |
public static final String PARAM_ORDER_ID
public static final String PARAM_ACCOUNT_NAME
public static final String PARAM_ACCOUNT_TYPE
public static final String PARAM_MERCHANT_ID
public static final String PARAM_FLAGS
public static final String PARAM_RECEIPT_WIDTH