After calling store.restore(), the entire hangs. I could not find any meaningful errors from this.
Kindly advise. I am using Corona build v3044
After calling store.restore(), the entire hangs. I could not find any meaningful errors from this.
Kindly advise. I am using Corona build v3044
I would like to add it doesn’t work for the latest daily build (v3061) as well.
Can the Corona team in charge of this plugin kindly look into this?
Thanks in advance!
Anyone can help here? Thanks.
Hi @Falcon777,
Did this formerly work in the same app, but now it doesn’t? Can you post some code on when you’re initializing IAP and then when you’re making the restore call?
Thanks,
Brent
This is the first time I am using the restore function. The purchase function works fine. I simply tried using store.restore() and the app hangs.
store.restore() should return immediately.
If you have items to restore, then your transaction call back function that you setup in your .init() call will get called once for each item to be restored.
When are you calling store.restore()?
Rob
It is called after displaying an alert dialog with a few options, with one of them to do restore.
Do you actually have items to restore?
If you don’t, calling store.restore() should just return immediately wth no feedback at all and this is by design. If there is something to restore, you will get get “purchased” transactions to your normal transaction listener.
I tested the “Restore” button in the game I’m making. I got no errors and no signs that my game locked up. It seems to be working as expected. Now I don’t have any purchases to restore…
Rob
I finally managed to track down the issue! It is caused by the native alert dialog which I call upon successful restoration in my restore listener. Once I removed that, everything works fine. Not sure why would the native alert dialog hangs the UI thread. The very same code works fine in iOS but not Android.
Thanks for the replies in this thread.
I would like to add it doesn’t work for the latest daily build (v3061) as well.
Can the Corona team in charge of this plugin kindly look into this?
Thanks in advance!
Anyone can help here? Thanks.
Hi @Falcon777,
Did this formerly work in the same app, but now it doesn’t? Can you post some code on when you’re initializing IAP and then when you’re making the restore call?
Thanks,
Brent
This is the first time I am using the restore function. The purchase function works fine. I simply tried using store.restore() and the app hangs.
store.restore() should return immediately.
If you have items to restore, then your transaction call back function that you setup in your .init() call will get called once for each item to be restored.
When are you calling store.restore()?
Rob
It is called after displaying an alert dialog with a few options, with one of them to do restore.
Do you actually have items to restore?
If you don’t, calling store.restore() should just return immediately wth no feedback at all and this is by design. If there is something to restore, you will get get “purchased” transactions to your normal transaction listener.
I tested the “Restore” button in the game I’m making. I got no errors and no signs that my game locked up. It seems to be working as expected. Now I don’t have any purchases to restore…
Rob
I finally managed to track down the issue! It is caused by the native alert dialog which I call upon successful restoration in my restore listener. Once I removed that, everything works fine. Not sure why would the native alert dialog hangs the UI thread. The very same code works fine in iOS but not Android.
Thanks for the replies in this thread.