PlayStorePurchaseListener

public interface PlayStorePurchaseListener

Interface definition for implementing an in-app purchase using the default purchase flow.

Public Method Summary

abstract boolean
isValidPurchase(String productId)
Called when the user triggers an in-app purchase.
abstract void
onInAppPurchaseFinished(InAppPurchaseResult inAppPurchaseResult)
Called when the user has completed an in-app purchase transaction.

Public Methods

public abstract boolean isValidPurchase (String productId)

Called when the user triggers an in-app purchase. Return true if this purchase is valid.

Parameters
productId The product ID (SKU) of the requested product.

public abstract void onInAppPurchaseFinished (InAppPurchaseResult inAppPurchaseResult)

Called when the user has completed an in-app purchase transaction. The publisher is responsible for crediting the user with the product, and calling finishPurchase() to consume the purchase.

Parameters
inAppPurchaseResult The InAppPurchaseResult containing the result of the purchase.

Send feedback about...

Need help? Visit our support page.