Search code examples
in-app-purchasein-app-billingandroid-billingin-app-subscriptionandroid-inapp-purchase

Is it necessary to migrate from "Google Play Billing with AIDL" to "Google Play Billing Library"?


I know that "Google Play Billing with AIDL" deprecated, but the app on which I am working is so complex that I don't want to change the core parts of the application.

On the play console, I am getting the below message:-

"We’ve detected that your app is using an old version of the Google Play Developer API. From December 1, 2019, versions 1 and 2 of this API will no longer be available. Update to version 3 before this date."

I checked that "Google Play Billing Library" internally is also using the same "Google Play Billing with AIDL", so I am a bit confused that if the issues could only be resolved only after updating the library.

In my code, I am already using the API version 3 of the billing APIs.

private IInAppBillingService billingService;

Bundle buyIntentBundle = billingService.getBuyIntent(3, packageName, sku, type, developerPayload);
billingService.getSkuDetails(3, application.getPackageName(),
                                    ITEM_TYPE_INAPP, bundle);
billingService.consumePurchase(3, application.getPackageName(), iabOrder.purchaseToken);
billingService.getPurchases(3, application.getPackageName(), ITEM_TYPE_INAPP, null);
billingService.isBillingSupported(3, application.getPackageName(),
                    ITEM_TYPE_INAPP);

Can anyone please help me out in finding the main reason of why is it that I am getting this particular message of using the 3rd version of Google Play Developer API.


Solution

  • I was getting this message because at the backend we were using a library that was using "Google Play Developer API v2" to validate the purchases.

    The library which we were

    • library name : in-app-purchase
    • library version : ~1.8.2

    Details can be seen over here

    So this message will be removed once we update the library to any version above 1.10.0 and follow the steps to get new googleAccToken and googleRefToken to use in the code.