I have an issue with In App Billing. I am using the helper class from the TrivialDrive sample.
Here is how I implement it.
- User presses Remove Ads
- Start Helper
- Use Listener to detect when helper is setup.
- Query Inventory
- Use Listener to detect when complete
- Check whether purchase has already been made. If so remove ads and exit
- If not then launchPurchaseFlow to purchase.
This works fine on one device, however if a user buys on one device then attempts it on another device the second device works as follows:
The helper sets up as normal, then when it checks inventory, it finds no item purchased (I understand there is a delay before this updates). It then attempts to purchase, but says item already bought on the Google play window. This would be fine if I could detect this in code, but it returns to the listener that the user canceled the purchase.
Is there a way to detect that the user has already bought the item using the purchaseFinishedListener
?