0

I need to get sku price. 10 skus placed in dev. console. Using this code I can get only information about purchased items.

    Bundle querySkus = new Bundle();
    querySkus.putStringArrayList(GET_SKU_DETAILS_ITEM_LIST, skuList);
    Bundle skuDetails = mService.getSkuDetails(3,
            mContext.getPackageName(), itemType, querySkus);
    ...
    ArrayList<String> responseList = skuDetails
            .getStringArrayList(RESPONSE_GET_SKU_DETAILS_LIST);

    // ONLY 2 PURCHASED ITEMS HERE!!!
    logDebug("Skus count: " + responseList.size());
    for (String thisResponse : responseList) {
        SkuDetails d = new SkuDetails(itemType, thisResponse);
        logDebug("Got sku details: " + d);
        inv.addSkuDetails(d);
    }

So, how to get the price for non-purchased skus?

Siarhei Sinelnikau
  • 423
  • 1
  • 6
  • 12

1 Answers1

0

Bundle querySkus = new Bundle(); querySkus.putStringArrayList(GET_SKU_DETAILS_ITEM_LIST, skuList);

The skuList should contain all the SKUs that you want the information about.

Bundle skuDetails = mService.getSkuDetails(3, mContext.getPackageName(), itemType, querySkus); make sure that the itemType is the one that you have selected while listing product on developer console.

For example if there are 6 items with type "inapp" and 4 items with type "subs" then if you want the details of those 6 items with type "inapp" then make sure that the above itemType variable contains the value "inapp".

Sunny Shah
  • 918
  • 1
  • 8
  • 8