...">

How to test billing in applications and getSkuDetails?

1) Uploaded .apk with

<uses-permission android:name="com.android.vending.BILLING"/>

2) Added items to the application product list. And they are active.

3) You have a test account.

mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener()

works great

but after

mHelper.queryInventoryAsync(mGotInventoryListener) 

or

Bundle skuDetails = mService.getSkuDetails(3, mContext.getPackageName(), type, skusBundle);

or like here

I see an empty list of items in the response. skuDetails.containsKey(RESPONSE_GET_SKU_DETAILS_LIST)truly

So what should I do to receive product information?

+4
source share
1 answer

I managed to download my active in-app applications, active and inactive, to unsigned and signed apks, so I don’t think that this restriction is on the Google side.

"", "subs", , . , , , , :

    ArrayList<String> productIds = new ArrayList<String>();
    productIds.add(your_product_id);
    // ... add more product ids here if needed ...
    Bundle querySkus = new Bundle();
    querySkus.putStringArrayList("ITEM_ID_LIST", productIds);
    result = mService.getSkuDetails(3, your_package_name, "inapp",
                querySkus);
    // use "subs" instead of "inapp" for subscriptions
+1

All Articles