0
votes

I'm trying to test actual purchases in my application before publishing it and using Billing Library v3. And I have a problem with the purchase of the item that has previously purchased on other device.

Here are my actions:

  1. I signed and uploaded .apk to the developer console;
  2. I added real purchase item to the uploaded .apk;
  3. I added my non-developer gmail account to the test accounts in the developer console. This account is used on both test devices as primary account;
  4. I uploaded signed .apk to both test devices;
  5. I run application on the first device and purchase the item - all working fine;
  6. Now I'm trying to ran the application on other device. On startup the application check purchases that have been made. And it says that previously purchased item is null! But if I try to purchase it again on this second device it returns "You already own this purchase" in response;

Is this a problem with unpublished app or test accounts? I'm sure that sent "developer payload" string is the same on both devices but I think it's not the case because on second device it doesn't event check the payload, it just returns null on inventory.getPurchase(SKU_OF_THE_ITEM) in response for queryInventoryAsync().

Does anybody had the same problem?

1

1 Answers

2
votes

It seems like the problem resolved. I have 2 accounts on my second device and I switched to the primary account from secondary acc without launching Google Play app. It has to be launched at least once - it shows some sort of "Accept Agreement" box and after accepting it the purchases in the application are processed correctly. Hope this helps to someone.