1

Presumably after xx.may.2019 method getPurchases() stopped returning the test item "android.test.purchased". Just stopped working, that's all. The client code has not changed. This behavior is observed on the three test devices. Attempts were made to clear the cache.

When i try to make a purchase:

private static final String IN_APP_BILLING = "inapp";
private final String packageName = context.getPackageName();
private String rewardId = "android.test.purchased";
private static final int BILLING_VER = 3;
......
try {
buyIntentBundle = getBillingService().getBuyIntent(BILLING_VER, packageName, rewardId, IN_APP_BILLING, null);
    } 
catch (RemoteException e) 
    {
      e.printStackTrace();
    }

Receive BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED.

Ok...

Then call

String consumToken = IN_APP_BILLING + ":" + packageName + ":" + rewardedId;

try {
getBillingService().consumePurchase(BILLING_VER, packageName, consumToken);
......

method is successfully completed.

After that, the purchase is successfully made. But the

try {
Bundle purchases = getBillingService().getPurchases(BILLING_VER, packageName, IN_APP_BILLING, null);
.....

method does not return a test item.


Uploaded alpha version in Google Play with real IDs - everything good works... The only refund are updated in the cache during the day(can be up to 3 days).

P.S. Sorry for bad English.

  • I'm seeing the same thing. Nothing in our code has changed, but getPurchases() is returning an empty list. Best guess now is that Google pushed an update to Google Play Services with a bug, but I have no way of confirming that. – Jim E-H May 30 '19 at 21:07
  • Same here, Google Play Services version 17.7.85 (040408-253824076) – devconsole Jun 27 '19 at 10:10

0 Answers0