PurchasesUpdatedListener

This reference document contains the details of PurchasesUpdatedListener and the corresponding public method OnPurchasesUpdated.

    public interface PurchasesUpdatedListener
     gg.now.billingclient.api.PurchasesUpdatedListener

Details

PurchasesUpdatedListener is the listener interface to update the in-app purchases using the now.gg Billing Service.

Usage

    abstract void onPurchasesUpdated(int billingResult, List<Purchase> purchases)
         // method to get notifications for purchase updates


Public Method

onPurchasesUpdated

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

Details

onPurchasesUpdated method is implemented to enable notifications for purchase updates. These include both purchases:

  1. Purchases initiated within your app/game.
  2. Purchases initiated outside your app/game.

Note: The purchases that are reported here, should be consumed.

Parameters

Parameters Description
billingResult The result of the purchase is updated with a return value. If the user already owns the item, the return value is 7. If the item is not available, the return value is 4. If the user cancels the purchase flow, the return value is 1.
purchases List of updated purchases

 

×
Text copied to clipboard
Link copied to clipbord
Questions? Please reach out to us at dev-support@now.gg