0

I recently updated my Android app to use Billing Library version 6.0.1, and I noticed that SkuDetailsParams class is deprecated. I'm trying to find the new replacement or alternative for SkuDetailsParams in this version.

Previously, I used SkuDetailsParams.newBuilder() to set the parameters for querying SKU details. What is the recommended way to achieve the same functionality in Billing 6.0.1 before the update I used:

SkuDetailsParams skuDetailsParams = SkuDetailsParams.newBuilder()
        .setSkusList(Collections.singletonList(productId))
        .setType(BillingClient.SkuType.INAPP)
        .build();

mBillingClient.querySkuDetailsAsync(skuDetailsParams, (billingResult, skuDetailsList) -> {
    // Query response handling logic...
});

any guidance on how to replace SkuDetailsParams in Billing 6.0.1?

EmLeons
  • 11
  • 4

1 Answers1

0

You must now use QueryProductDetailsParams, QueryProductDetailsParams.Product, and queryProductDetailsAsync. Also consider the case of an outdated Play Services version on the user's device, in such case, you need to fallback to deprecated methods.

Check out this migration guide from v4-5 to v6, it has all you need to know.