Method | Description | |
---|---|---|
OnBillingSupported ( bool supported, string type ) : void |
This is the callback that is invoked when Android Market responds to the BillingService#checkBillingSupported() request.
|
|
OnPurchaseStateChange ( |
This is the callback that is invoked when an item is purchased, refunded, or canceled. It is the callback invoked in response to calling BillingService#requestPurchase(String). It may also be invoked asynchronously when a purchase is made on another device (if the purchase was for a Market-managed item), or if the purchase was refunded, or the charge was canceled. This handles the UI update. The database update is handled in {@link ResponseHandler#purchaseResponse(Context, PurchaseState, String, String, long)}.
|
|
OnRequestPurchaseResponse ( |
This is called when we receive a response code from Market for a RequestPurchase request that we made. This is NOT used for any purchase state changes. All purchase state changes are received in #onPurchaseStateChange(PurchaseState, String, int, long). This is used for reporting various errors, or if the user backed out and didn't purchase the item. The possible response codes are: RESULT_OK means that the order was sent successfully to the server. The onPurchaseStateChange() will be invoked later (with a purchase state of PURCHASED or CANCELED) when the order is charged or canceled. This response code can also happen if an order for a Market-managed item was already sent to the server. RESULT_USER_CANCELED means that the user didn't buy the item. RESULT_SERVICE_UNAVAILABLE means that we couldn't connect to the Android Market server (for example if the data connection is down). RESULT_BILLING_UNAVAILABLE means that in-app billing is not supported yet. RESULT_ITEM_UNAVAILABLE means that the item this app offered for sale does not exist (or is not published) in the server-side catalog. RESULT_ERROR is used for any other errors (such as a server error).
|
|
OnRestoreTransactionsResponse ( |
This is called when we receive a response code from Android Market for a RestoreTransactions request that we made. A response code of RESULT_OK means that the request was successfully sent to the server.
|
|
PurchaseObserver ( Android.App.Activity activity, Android.OS.Handler handler ) : System |
Method | Description | |
---|---|---|
InitCompatibilityLayer ( ) : void | ||
PostPurchaseStateChange ( |
Updates the UI after the database has been updated. This method runs in a background thread so it has to post a Runnable to run on the UI thread.
|
|
StartBuyPageActivity ( Android.App.PendingIntent pendingIntent, Android.Content.Intent intent ) : void |
public abstract OnBillingSupported ( bool supported, string type ) : void | ||
supported | bool | true if in-app billing is supported. |
type | string | |
return | void |
public abstract OnPurchaseStateChange ( |
||
purchaseState | the purchase state of the item | |
itemId | string | a string identifying the item (the "SKU") |
quantity | int | the current quantity of this item after the purchase |
purchaseTime | long | the time the product was purchased, in /// milliseconds since the epoch (Jan 1, 1970) |
developerPayload | string | |
return | void |
public abstract OnRequestPurchaseResponse ( |
||
request | ||
responseCode | ||
return | void |
public abstract OnRestoreTransactionsResponse ( |
||
request | ||
responseCode | ||
return | void |
public PurchaseObserver ( Android.App.Activity activity, Android.OS.Handler handler ) : System | ||
activity | Android.App.Activity | |
handler | Android.OS.Handler | |
return | System |