Hi there,
There could be a couple of things going on here.
After receiving the iap.restore call, IAP Badger asks Google Play, “is there anything to restore for this user?” If there isn’t, Google Play just doesn’t reply. Silence. Nothing. Not even a shake of the head.
If you’re using the example code from the website (with the spinner etc.), then your app will wait until a given timeout period, after which it will assume that no message is coming and give up. At this point, IAP Badger calls the timeout listener specified in **iap.restore() **to say, “there’s nothing to restore here.”
(If you don’t specify a listener, it will default to a text box telling the user the process failed.)
The second thing to bear in mind is that Google Play will only tell you about any non-consumable products that should be restored (eg. remove ads, unlock game). Their servers won’t tell you about any consumables the user has purchased (eg. extra coins).
So what may be going on is, if your app doesn’t have any non-consumable products to restore, the app is sitting there waiting for a message that is never going to come from Google Play.
A quick way to check this is to lower the amount of time IAP Badger waits for a message for debugging purposes. This is the cancelTime parameter you pass to iap.restore() (see this page). Reduce it to three or four seconds for testing purposes and see what messages you get. (In your release, you have to account for users around the world who may have very slow connections).
If this doesn’t give you any insight into what’s happening, then the most likely problem is something to do with:
- your setup on Google Play’s console
- the test users you are using to test your IAPs. (Remember that you cannot use your developer Google account to test IAPs on your device.)
Kind regards,
Simon