|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazon.InAppSDK.purchasing.PurchasingManager
public final class PurchasingManager
The PurchasingManager
presents the primary API for interacting with the Amazon Appstore for Android In App
SDK: Purchasing Framework. Before using operations in this class, you must first register a
PurchasingObserver
instance via registerObserver(PurchasingObserver)
.
Method Summary | |
---|---|
static java.lang.String |
initiateItemDataRequest(java.util.Set<java.lang.String> skus)
Initiate a request to retrieve item data for between 1 and 100 SKUs. |
static java.lang.String |
initiatePurchaseRequest(java.lang.String sku)
Initiate a request to purchase a SKU. |
static java.lang.String |
initiatePurchaseUpdatesRequest(Offset offset)
Initiate a request to retrieve updates about items the customer has purchased and/or revoked since last time you checked. |
static void |
registerObserver(PurchasingObserver purchasingObserver)
You must register a PurchasingObserver before invoking operations in this class. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void registerObserver(PurchasingObserver purchasingObserver)
PurchasingObserver
before invoking operations in this class. Good practice is
to do this in your Activity's onStart lifecycle method.
purchasingObserver
- The PurchasingObserver
to registerpublic static java.lang.String initiatePurchaseRequest(java.lang.String sku)
PurchasingObserver.notifyPurchaseResponse(PurchaseResponse)
.
sku
- The vendor SKU to initiate a purchase for
PurchaseResponse
received by the
PurchasingObserver.notifyPurchaseResponse(PurchaseResponse)
callback.public static java.lang.String initiateItemDataRequest(java.util.Set<java.lang.String> skus)
PurchasingObserver.notifyItemDataResponse(ItemDataResponse)
.
skus
- A set of SKUs you wish to retrieve Item
data for. No more than 100 SKUs are allowed.
ItemDataResponse
received by the
PurchasingObserver.notifyItemDataResponse(ItemDataResponse)
callback.public static java.lang.String initiatePurchaseUpdatesRequest(Offset offset)
Initiate a request to retrieve updates about items the customer has purchased and/or revoked since last time you checked. A good use of this operation is to invoke it once per application run to make sure your view of ownership is consistent across devices.
This operation works with paginated data. The beginning of the data set is specified by the Offset
you
provide here. The response will contain an Offset
marking the beginning of the next data set, if more is
available.
offset
- Marks the beginning of the data set
PurchaseUpdatesResponse
received
by the PurchasingObserver.notifyPurchaseUpdatesResponse(PurchaseUpdatesResponse)
callback.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |