lightbulb_outline Help shape the future of the Google Play Console, Android Studio, and Firebase. Start survey

PurchasesUpdatedListener

public interface PurchasesUpdatedListener

com.android.billingclient.api.PurchasesUpdatedListener


Listener interface for purchase updates which happen when, for example, the user buys something within the app or by initiating a purchase from Google Play Store.

Summary

Public methods

abstract void onPurchasesUpdated(int responseCode, List<Purchase> purchases)

Implement this method to get notifications for purchases updates.

Public methods

onPurchasesUpdated

void onPurchasesUpdated (int responseCode, 
                List<Purchase> purchases)

Implement this method to get notifications for purchases updates. Both purchases initiated by your app and the ones initiated by Play Store will be reported here.

Parameters
responseCode int: Response code of the update.

purchases List: List of updated purchases if present.