libgdx / gdx-pay

A libGDX cross-platform API for InApp purchasing.
Apache License 2.0
225 stars 83 forks source link

PurchaseObserver#handlePurchase() not called although purchase ended successfully #156

Closed amitkot closed 6 years ago

amitkot commented 6 years ago

I setup PurchaseSystem according to the README, and I see some of the PurchaseObserver methods being called, but I can't get handlePurchase() to be called.

I am testing this with a product that I added to the Play Console, and a test account that I created. I am getting the small Google Play IAP window to show, and I can select the purchase option. Then the window displays "purchased successfully", but the handlePurchase() callback is not called.

Any clues?

amitkot commented 6 years ago

OK, I found the problem. My Android launcher that extends AndroidApplication was overriding the Activity#onActivityResult() method, so the PurchaseObserver AndroidEventListener could not be called.

Thanks for this useful library!