3

I implemented in-app billing using com.android.billingclient:billing:4.0.0 library

The skuList I provide contains 8 elements. I get the results only for 7.
The one that is excluded does exist; so the problem is not about my app missing one product

        SkuDetailsParams params = SkuDetailsParams.newBuilder()
                .setSkusList(skuList)
                .setType(BillingClient.SkuType.SUBS)
                .build();

        Log.d(C.T4,"SKU list size: " + skuList.size()); // the skuList contains 8 skus (all valid)

        billingClient.querySkuDetailsAsync(params, (billingResult,skuDetailsList) -> {
            Log.d(C.T4,"skuDetailsList size: " + skuDetailsList.size()); // I get the details only for 7 skus
        });
Alex Busuioc
  • 992
  • 1
  • 11
  • 24
  • You are setting the `SkuDetailsParams` type to `SUBS`. As you say you have 8 valid SKUs provided by the `skuList` but `querySkuDetailsAsync` will return the `skuDetailsList` only of the `SUBS type`. Is that any chance you have 1 SKU of `INAPP type`? – Moisoni Ioan Jun 08 '21 at 22:29
  • 1
    No chance. All of them are SUBS. Actually, if I remove any 1 of the 8, it will return the other 7. It's like there is a LIMIT 7 on the query. weird – Alex Busuioc Jun 09 '21 at 08:11
  • Have you found a solution? For some reason I'm always getting one inapp element missing. – Mirek Nov 16 '22 at 11:19
  • I don't remember what I've done. It works well now. I use the same code with the latest version of the library (com.android.billingclient:billing:5.1.0). However, I will have to refactor the code because I see "querySkuDetailsAsync()" is deprecated now. – Alex Busuioc Nov 16 '22 at 12:25
  • I experience a very similar behaviour some users do not get the existing skus while others do get them. All use modern phones and API versions. – Lingviston Apr 18 '23 at 14:35

0 Answers0