Home > Mobile >  Google Play Billing Library 5.0 deprecation warnings
Google Play Billing Library 5.0 deprecation warnings

Time:05-27

Since I've upgraded the BillingClient to version 5.0.0:

googleImplementation 'com.android.billingclient:billing:5.0.0'

I get these unique deprecation warnings:

warning: [deprecation] getSkus() in Purchase has been deprecated
warning: [deprecation] getSkus() in PurchaseHistoryRecord has been deprecated
warning: [deprecation] SkuType in BillingClient has been deprecated
warning: [deprecation] SkuDetailsResponseListener in com.android.billingclient.api has been deprecated
warning: [deprecation] SkuDetailsParams in com.android.billingclient.api has been deprecated
warning: [deprecation] SkuDetails in com.android.billingclient.api has been deprecated
warning: [deprecation] querySkuDetailsAsync(SkuDetailsParams,SkuDetailsResponseListener) in BillingClient has been deprecated
warning: [deprecation] setSkuDetails(SkuDetails) in Builder has been deprecated

eg. the documentation suggests to use ProductDetailsResponseListener instead.

Wanted to ask, how to use it?

CodePudding user response:

SkuDetailsResponseListener is replaced by ProductDetailsResponseListener along with other methods & callbacks since v5 adds new subscription capabilities (as per docs.).

You can check the complete migration guide here:
https://developer.android.com/google/play/billing/migrate-gpblv5

  • Related