Purchase Dialog is only visible if I background the app once

Hello,

I have a very weird issue that I couldn’t find a way around. I use GameMaker and an Amazon Appstore implementation. Everything works perfectly. I can get the previous purchases, SKU data etc.

However, on Live App Test (and Production as it appears), I have an issue. PurchasingService.purchase doesn’t show the purchase dialog.

If I background my app once and foreground it again, I can now normally invoke the dialog and everything works fine.

What could be the cause?

Additional Info: This behaviour doesn’t happen on App Tester with debug mode. Only in production and Live App Testing.

Note: I have narrowed down the issue - that Amazon Appstore SDK believes that the UI is not visible at the beginning. Therefore, it puts the order in a queue until the UI is visible again.

Backgrounding and foregrounding the app resets the Appstore SDK UI setting, therefore makes it believe that the UI is visible.

Not sure how I can fix that

Solution is found for the issue.

For anyone encounters this in the future: Make sure that you register the PurchaseListener in the main activity’s onCreate, otherwise the Amazon Appstore SDK believes that the UI is not visible.

1 Like