Android Question getSkuDetails()

Robert Valentino

Well-Known Member
Licensed User
Longtime User
B4X:
ArrayList<String> productIds =newArrayList<String>();
productIds.add(your_product_id);// ... add more product ids here if needed ...Bundle querySkus =newBundle();
querySkus.putStringArrayList("ITEM_ID_LIST", productIds);
result = mService.getSkuDetails(3, your_package_name,"inapp",
querySkus);


The getSkuDetails() method

This method returns product details for a list of product IDs. In the response Bundle sent by Google Play, the query results are stored in a String ArrayList mapped to the DETAILS_LIST key. Each String in the details list contains product details for a single product in JSON format. The fields in the JSON string with the product details are summarized in table 2.

Table 2. Description of JSON fields with product item details returned from a getSkuDetails request.

Key Description
productId The product ID for the product.
type Value must be “inapp” for an in-app product or "subs" for subscriptions
title Title of the product.
description Description of the product.
 

Ohanian

Active Member
Licensed User
Longtime User
Hi,

if you want to get the SKU detail here's the solution :

B4X:
https://www.b4x.com/android/forum/threads/how-to-get-sku-full-details-of-a-purchase-item.54829/#content
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Well that seems to be the answer for purchased items.

I do not mind hard coding all the product id's (Titles) in my program.
But to hard code all the Descriptions and pricing? Seems crazy.

Hard to believe that Google doesn't give some way of requesting what products there are?

BobVal
 
Upvote 0
Top