Pressing "home" on "confirm Password" page causes IAP to fail

I have been testing our Google Play IAP, and I noticed an edge case that can cause a crucial failure.

  1. When the user initiates a IAP purchase, my code basically throws up a native.setActivityIndicator(true); then call the store API to initiate purchase

  2. The user hits the “Buy” button, then is presented with a password screen (IAPScreen2.png)

  3. The user hits the “home” button to suspend the app.

  4. The user goes back in the app, and now the app is stuck with the activity indicator screen (IAPScreen3.png) with no way of getting out of it. “Back” button no longer works. The reason is that when the app was suspended, there was no call-back to the store.init()'s callback function with a failed/cancelled code. Consequently, the activityIndicator is still on.

If on Step #3, if I had hit the back button to exit the app then things would behave correctly with the correct call back to store.init().

We’ve investigated trapping the “applicationSuspend” event and reset the activityIndicator that way. But then realized it won’t work. The reason is that if the app were to go to sleep following step #2 (by time-out), then the app does go into suspend, but when the device is awaken, it returns to step #2 properly.

Have others encountered this before? Is this a Corona bug? Is there a way around it? Seems like quite a serious issue given that it is on the purchase path, and there is no way out for the user.

Thanks!

Andrew