|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazon.InAppSDK.purchasing.PurchasingObserver
com.amazon.InAppSDK.purchasing.BasePurchasingObserver
public class BasePurchasingObserver
This is an implementation of the PurchasingObserver
that does nothing, allowing you to override only the
callback methods you need.
Constructor Summary | |
---|---|
BasePurchasingObserver(android.content.Context context)
Creates a new BasePurchasingObserver that is associated with your Activity or Application Context. |
Method Summary | |
---|---|
void |
notifyItemDataResponse(ItemDataResponse itemDataResponse)
This callback method allows you to be notified when an ItemDataResponse is available for a request that
was initiated previously via PurchasingManager.initiateItemDataRequest(java.util.Set) . |
void |
notifyPurchaseResponse(PurchaseResponse purchaseResponse)
This callback method allows you to be notified when a PurchaseResponse is available for a purchase that
was initiated previously via PurchasingManager.initiatePurchaseRequest(String) . |
void |
notifyPurchaseUpdatesResponse(PurchaseUpdatesResponse purchaseUpdatesResponse)
This callback method allows you to be notified when a PurchaseUpdatesResponse is available for a request
that was initiated previously via PurchasingManager.initiatePurchaseUpdatesRequest(Offset) . |
void |
notifySdkAvailable(boolean isSandboxMode)
This is the first callback that will be invoked after you register your PurchasingObserver with the
PurchasingManager , and will indicate whether the In-App SDK is running in sandbox mode (with test data)
or production mode (with real data). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasePurchasingObserver(android.content.Context context)
BasePurchasingObserver
that is associated with your Activity or Application Context.
context
- The Activity or Application Context in which you are creating this BasePurchasingObserver
Method Detail |
---|
public void notifySdkAvailable(boolean isSandboxMode)
PurchasingObserver
This is the first callback that will be invoked after you register your PurchasingObserver
with the
PurchasingManager
, and will indicate whether the In-App SDK is running in sandbox mode (with test data)
or production mode (with real data).
Please be aware that this method will be invoked on your UI thread. If you must perform any long-running tasks in your implementation you should do them on another thread, possibly using an AsyncTask.
notifySdkAvailable
in class PurchasingObserver
isSandboxMode
- true if we are running in sandbox mode with test data, false if we're running in production mode with
real datapublic void notifyPurchaseResponse(PurchaseResponse purchaseResponse)
PurchasingObserver
This callback method allows you to be notified when a PurchaseResponse
is available for a purchase that
was initiated previously via PurchasingManager.initiatePurchaseRequest(String)
.
Implement this method to update your application state, save purchase information to a database, send it to your developer server, etc.
Please be aware that this method will be invoked on your UI thread. If you must perform any long-running tasks in your implementation you should do them on another thread, possibly using an AsyncTask.
notifyPurchaseResponse
in class PurchasingObserver
purchaseResponse
- Indicates the status of the purchase operation and may contain a receiptpublic void notifyItemDataResponse(ItemDataResponse itemDataResponse)
PurchasingObserver
This callback method allows you to be notified when an ItemDataResponse
is available for a request that
was initiated previously via PurchasingManager.initiateItemDataRequest(java.util.Set)
.
Please be aware that this method will be invoked on your UI thread. If you must perform any long-running tasks in your implementation you should do them on another thread, possibly using an AsyncTask.
notifyItemDataResponse
in class PurchasingObserver
itemDataResponse
- Provides access to item data and the status of the requestpublic void notifyPurchaseUpdatesResponse(PurchaseUpdatesResponse purchaseUpdatesResponse)
PurchasingObserver
This callback method allows you to be notified when a PurchaseUpdatesResponse
is available for a request
that was initiated previously via PurchasingManager.initiatePurchaseUpdatesRequest(Offset)
.
Please be aware that this method will be invoked on your UI thread. If you must perform any long-running tasks in your implementation you should do them on another thread, possibly using an AsyncTask.
notifyPurchaseUpdatesResponse
in class PurchasingObserver
purchaseUpdatesResponse
- Provides access to receipt data and the status of the request
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |