Search code examples
javaandroidin-app-billing

Android Studio: In-App Billing - Why is the item detail call returning an empty list?


Using in-app-billing v4.0 (per google instructions)

I uploaded a test app to my console and created a closed tester release. You have to upload a .aab in order to create items.

So I created two items and activiated them at 0.99 USD.

I use a debug version of the uploaded .aab to test code and when I try to get item details...

public void showProds(){ // show products
    List<String> skuList = new ArrayList<>();
    skuList.add("tokens");
    skuList.add("extra_lives");
    SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder();
    params.setSkusList(skuList).setType(BillingClient.SkuType.INAPP);
    billingClient.querySkuDetailsAsync(params.build(),
            new SkuDetailsResponseListener() {
                @Override
                public void onSkuDetailsResponse(BillingResult billingResult,
                                                 List<SkuDetails> skuDetailsList) {
                    // Process the result.
                    gmeUI.gSurf.tchActnbDebug = String.valueOf(skuDetailsList);
                }
            });

}

The string value of the list return is always "[]".

What am I missing?

Is it the fact I created a "closed testing" release?


Solution

  • Looks like the problem was the closed testing. You have to create an alpha or beta testing in order to get results.