I have a problem with In App Billing. I use the helper class from the TrivialDrive example.
This is how I implement it.
- Press User Delete Ads
- Initial assistant
- Use a listener to determine when an assistant is configured.
- Inventory of requests
- Use listener to detect when completed
- Check if a purchase has been made. If so remove the ad and exit
- If not, runPurchaseFlow to purchase.
This works fine on one device, however, if a user purchases on one device and then tries on another device, the second device works as follows:
The assistant is configured as usual, then when he checks the inventory, he does not find the purchased item (I understand that there is a delay before this update). Then he tries to purchase, but says that the item has already been purchased in the Google game window. It would be nice if I could detect this in the code, but it returns to the listener that the user has canceled the purchase.
Is there a way to detect that a user has already bought an item using purchaseFinishedListener ?
source share