I'm now using the new Play Billing Library
Basically, I followed the documentation to query available items to purchase
SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder(); params.setSkusList(skuList).setType(itemType); mBillingClient.querySkuDetailsAsync(params.build(), new SkuDetailsResponseListener() { @Override public void onSkuDetailsResponse(int responseCode, List<SkuDetails> skuDetailsList) { listener.onSkuDetailsResponse(responseCode, skuDetailsList); }
However, the responseCode is 0 and the list is also empty. But I checked onBillingSetupFinished is successful. The skuList that provided to SkuDetailsParams.Builder is not empty, and the values inside the skuList (sku_id) is also same as Product ID that specifies on Google Play Console.
Does anyone know the reason? Thanks!!
I have spent few hours with this issue and the problem was that my debug build/CI builds had applicationIdSuffix
. So only production build with proper applicationId was able to retrieve the products.
Sounds like you're having issues with your Google Play Console setup.
Please check that:
And wait for some time after setup is done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With