Artenus 2D Framework
Artenus Reference
Interface for classes that listen to in-app billing events.
public interface InventoryListener

Method Summary

Modifier and TypeMethod and Description
public voidonConsumed(ProductReceipt purchase)
Called to report that a previous consumption request has succeeded.
public voidonInventoryFailure()
Called to report that the request to load the product list has failed.
public voidonInventoryLoaded(ProductList inventory)
Called when the list of items in the inventory is ready.
public voidonPurchaseFailure(ProductReceipt purchase)
Called to report that a previous purchase has failed.
public voidonPurchased(ProductReceipt purchase)
Called to report that a previous purchase has succeeded.

Method Detail

onConsumed
public void onConsumed(
    ProductReceipt purchase
)
Called to report that a previous consumption request has succeeded.
Parameters:
purchaseThe corresponding product receipt
onInventoryFailure
public void onInventoryFailure()
Called to report that the request to load the product list has failed. This means that the in-app billing is not available for the current session.
onInventoryLoaded
public void onInventoryLoaded(
    ProductList inventory
)
Called when the list of items in the inventory is ready. For items owned by the user, the getReceipt() returns the corresponding receipt.
Parameters:
inventoryThe list of products in the inventory
See Also:
onPurchaseFailure
public void onPurchaseFailure(
    ProductReceipt purchase
)
Called to report that a previous purchase has failed. Application should then abort the transaction, clear any waiting dialogs, and report the failure to the user.
Parameters:
purchaseThe corresponding product receipt
onPurchased
public void onPurchased(
    ProductReceipt purchase
)
Called to report that a previous purchase has succeeded. It provides information about the purchase. If the product is a consumable which needs to be consumed after purchase, this would be a good place to consume it.
Parameters:
purchasePurchase information
See Also: