Android APIs
public interface

PlayStorePurchaseListener

com.google.android.gms.ads.purchase.PlayStorePurchaseListener

Class Overview

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

Summary

Public Methods
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.