net.robotmedia.billing
Interface IBillingObserver

All Known Implementing Classes:
AbstractAdFreePreferenceActivity, AbstractBillingObserver, DefaultBillingObserver

public interface IBillingObserver


Method Summary
 void onCheckBillingSupportedResponse(boolean supported)
          Called each time
 void onErrorRestoreTransactions(ResponseCode responseCode)
          Called when a restore transactions request ended with a server error.
 void onPurchaseIntentFailure(String productId, ResponseCode responseCode)
          Called when purchase intent was not sent due to billing service error
 void onPurchaseIntentOK(String productId, android.app.PendingIntent purchaseIntent)
          Called after requesting the purchase of the specified item.
 void onPurchaseStateChanged(String productId, Transaction.PurchaseState state)
          Called when the specified item is purchased, cancelled or refunded.
 void onRequestPurchaseResponse(String productId, ResponseCode response)
          Called with the response for the purchase request of the specified item.
 void onTransactionsRestored()
          Called when a restore transactions request has been successfully received by the server.
 

Method Detail

onCheckBillingSupportedResponse

void onCheckBillingSupportedResponse(boolean supported)
Called each time

Parameters:
supported - if true, in-app billing is supported. Otherwise, it isn't.
See Also:
BillingController.checkBillingSupported(android.content.Context)

onPurchaseIntentOK

void onPurchaseIntentOK(@Nonnull
                        String productId,
                        @Nonnull
                        android.app.PendingIntent purchaseIntent)
Called after requesting the purchase of the specified item.

Parameters:
productId - id of the item whose purchase was requested.
purchaseIntent - a purchase pending intent for the specified item.
See Also:
BillingController.requestPurchase(android.content.Context, String, boolean)

onPurchaseIntentFailure

void onPurchaseIntentFailure(@Nonnull
                             String productId,
                             @Nonnull
                             ResponseCode responseCode)
Called when purchase intent was not sent due to billing service error

Parameters:
productId - id of the item whose purchase was requested
responseCode - one of the failures response codes from billing service

onPurchaseStateChanged

void onPurchaseStateChanged(@Nonnull
                            String productId,
                            @Nonnull
                            Transaction.PurchaseState state)
Called when the specified item is purchased, cancelled or refunded.

Parameters:
productId - id of the item whose purchase state has changed.
state - purchase state of the specified item.

onRequestPurchaseResponse

void onRequestPurchaseResponse(@Nonnull
                               String productId,
                               @Nonnull
                               ResponseCode response)
Called with the response for the purchase request of the specified item. This is used for reporting various errors, or if the user backed out and didn't purchase the item.

Parameters:
productId - id of the item whose purchase was requested
response - response of the purchase request

onTransactionsRestored

void onTransactionsRestored()
Called when a restore transactions request has been successfully received by the server.


onErrorRestoreTransactions

void onErrorRestoreTransactions(@Nonnull
                                ResponseCode responseCode)
Called when a restore transactions request ended with a server error.

Parameters:
responseCode - response code


Copyright © 2013. All Rights Reserved.