net.robotmedia.billing.helper
Class AbstractBillingObserver
java.lang.Object
net.robotmedia.billing.helper.AbstractBillingObserver
- All Implemented Interfaces:
- IBillingObserver
- Direct Known Subclasses:
- DefaultBillingObserver
public abstract class AbstractBillingObserver
- extends Object
- implements IBillingObserver
Abstract subclass of IBillingObserver that provides default implementations
for IBillingObserver.onPurchaseIntentOK(String, android.app.PendingIntent) and
IBillingObserver.onTransactionsRestored().
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY_TRANSACTIONS_RESTORED
public static final String KEY_TRANSACTIONS_RESTORED
- See Also:
- Constant Field Values
context
protected android.content.Context context
AbstractBillingObserver
public AbstractBillingObserver(android.content.Context context)
isTransactionsRestored
public boolean isTransactionsRestored()
isTransactionsRestored
public static boolean isTransactionsRestored(@Nonnull
android.content.Context context)
onPurchaseIntentOK
public void onPurchaseIntentOK(@Nonnull
String productId,
@Nonnull
android.app.PendingIntent purchaseIntent)
- Called after requesting the purchase of the specified item. The default
implementation simply starts the pending intent.
- Specified by:
onPurchaseIntentOK in interface IBillingObserver
- 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)
onTransactionsRestored
public void onTransactionsRestored()
- Description copied from interface:
IBillingObserver
- Called when a restore transactions request has been successfully
received by the server.
- Specified by:
onTransactionsRestored in interface IBillingObserver
onErrorRestoreTransactions
public void onErrorRestoreTransactions(@Nonnull
ResponseCode responseCode)
- Description copied from interface:
IBillingObserver
- Called when a restore transactions request ended with a server error.
- Specified by:
onErrorRestoreTransactions in interface IBillingObserver
- Parameters:
responseCode - response code
Copyright © 2013. All Rights Reserved.