Hi Paul,
I can confirm, I've rebuilt my app with the new beta and although the original problem I was having - the app not stopping while the purchase went through - a new one has surfaced. If the user cancels the purchase it's going back to it's main code no problem, but when I complete the purchase it crashes the app. I've then later got no way at all of telling if the purchase was successful. The code in full is as follows:
ok=0
inapppurchasesettitle("MMS Book")
inapppurchaseaddproductid("messmonsters")
available=getinapppurchaseavailable(0)
inapppurchasesetup()
inapppurchaseactivate(0)
while GetInAppPurchaseState()=0
sync()
endwhile
ok = GetInAppPurchaseAvailable(0)
if ok>0
available2 = 1
else
available2 = 0
endif
message("We appear to be done? Avail1="+str(available)+", avail2="+str(available2))
Don't think I'm missing anything, but the app just literally froze after the payment was authorised, and the app gave an old style message (black bar that faded out after a few seconds) saying my content would be available soon???
The item is a non managed purchase. When trying a managed purchase google quite correctly kicked me back saying i'd purchase it, but once again the app seemed unable to know that it effectively had permission to download it.
I plan to use unmanaged apps anyway so that's not so much an issue, but not sure why it crashed when I did purchase the app???
EDIT: sorry, maybe I should point out, if I use the back key to cancel the purchase, I get the message. When completing the purchase it hangs before the message so I'm assuming either on the
ok = GetInAppPurchaseAvailable(0)
line or during the while:endwhile loop that it's failing to register and exit that. Not too sure which, I'll try playing with the loop and see.
EDIT: Ok, last edit. I've done some playing around and it is def the while:endwhile loop that's causing the problem in my code snippet. I added another message after the purchase code so it looks like this:
ok=0
inapppurchasesettitle("MMS Book")
inapppurchaseaddproductid("messmonsters")
available=getinapppurchaseavailable(0)
inapppurchasesetup()
inapppurchaseactivate(0)
while getinapppurchasestate()=0
sync()
endif
sync()
ok = GetInAppPurchaseAvailable(0)
message("I've returned from the purchase code, value of OK variable is "+str(ok))
if ok>0
available2 = 1
else
available2 = 0
endif
message("We appear to be done? Avail1="+str(available)+", avail2="+str(available2))
And it still hangs on a successful purchase. One odd thing though, the second message in my code displays first, then the one before that saying it's returned from the purchasing code after it?
I removed the while:endwhile loop altogether then both messages popped up just before the purchasing routine began, so that is clearly where it's dying when making a purchase is successful.
Hope this maybe helps you in some way...this is the very last hurdle to my app being ready for distribution now!