Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In App Purchase : Two devices with same account not getting same purchased items

What I am trying?

Purchasing items in one android device having configured X email address. When I check in another device having the same email address configured. but items purchased on first device is not getting available in another device.

What I have tried?

I have tried using :

inappBillingService.getPurchases(InAppBuyActivity.INAPPVERSION,
                    getPackageName(), "inapp", null);

and also tried using :

IabHelper.QueryInventoryFinishedListener mGotInventoryListener
   = new IabHelper.QueryInventoryFinishedListener() {
   public void onQueryInventoryFinished(IabResult result,
      Inventory inventory) {

      if (result.isFailure()) {
        // handle error here
      }
      else {
        // Not getting same purchased on both devices
      }
   }
};

I am generating signed apk having the same version name and version code as of playstore version.

like image 976
SANAT Avatar asked Mar 24 '17 05:03

SANAT


1 Answers

I have tested the app using two devices. It takes sometime to reflect the purchases.

If i delete the app and reinstall it as a fresh then new purchased items are there. But, if i purchase one item and check it on second device at same time its not reflected there.

App shows items already purchased in second device when user try to purchase it. But, its not available in inappBillingService.getPurchases and IabHelper.QueryInventory.

like image 103
SANAT Avatar answered Nov 06 '22 12:11

SANAT