Android InAppBilling v3 queryInventoryAsync doesn't return information about purchased items on other device

StackOverflow https://stackoverflow.com/questions/23109404

Question

I'm developing Android application with InAppBilling support. There is following algorithm:

  1. Check what user has bought and show it
    mHelper.queryInventoryAsync(false, null, listener)
  1. Then check what user can buy (in order to show some dialog for him)
    mHelper.queryInventoryAsync(true, skuList, listener)

And everything works fine on some device (phone).

Then I install application on tablet (using the same account) but information about purchased items is not available.

(Information about items user can buy I can get successfully.)

How can I get information about paid items (items user has bought) on other device (with the same account)?

-- UPDATED --

very strange use case:

  1. User buys 2 of 3 available items using Android InAppBilling on phone.

  2. Check 2 just bought items on phone. They are visible.

  3. Install app on tablet (or some other device).

  4. Check 2 just bought items on tablet. They are visible as well.

  5. Buy 3rd the last one item on phone

  6. Check 3rd item on phone. It is visible.

  7. Check 3rd item on tablet. It is not visible

What happens in source code:

IabHelper.java

Bundle ownedItems = mService.getPurchases(3, mContext.getPackageName(),
                itemType, continueToken);
...

ArrayList<String> ownedSkus = ownedItems.getStringArrayList(
                RESPONSE_INAPP_ITEM_LIST);
ArrayList<String> purchaseDataList = ownedItems.getStringArrayList(
                RESPONSE_INAPP_PURCHASE_DATA_LIST);
ArrayList<String> signatureList = ownedItems.getStringArrayList(
                RESPONSE_INAPP_SIGNATURE_LIST);

Consider number items 5-7 (have just bought 3rd item):

  1. On phone we have info about 3 bought items

  2. On tablet we have info about 2 bought items (1st and 2nd). But why 3rd item is not available here?

Était-ce utile?

La solution

looks like its issue of Google Play. Can be fixed with clearing cache of Google Play app or reboot device.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top