That was an amazing turnaround on this beta, thanks Paul. I've installed and played around a little now, just trying the IAP now....
EDIT 1: HI Paul. Right, I've rebuilt the project and run it on two devices now, but I'm not getting anywhere at all with the IAP - it's now not even starting for an unmanaged product. But I'm getting a very unusual occurrence which I noticed ever since the messaging was changed to the box version, and that's that instructions AFTER the message command are often executing first? I assume this new messaging has moved to background code? If so, are you treading processes as the test device is a Note 2 with a quad core processor, so is it possible the threads are not timing correctly? Below is an extract of the exact code as it is being run by the app, in edited form. Please note, if I rem out the actual purchasing lines everything else runs perfectly.
if getspriteexists(20260)=1
Message("Starting purchase routine...")
if getpointerx()>=getspritex(20260) and getpointerx()<=getspritex(20260)+getspritewidth(20260) and getpointery()>=getspritey(20260) and getpointery()<=getspritey(20260)+getspriteheight(20260)
message("You are buying a product...")
if getspritevisible(20260)=1 and pickmode=2
// this is the in app purchasing code
message("Starting entire purchase routine...")
ok=0
message("Starting set up")
sync()
inapppurchasesettitle("test purchase")
message("Defining ID")
sync()
inapppurchaseaddproductid("messmonsters",1)
available=getinapppurchaseavailable(0)
message("Initiate purchase")
inapppurchasesetup()
message("activate purchase")
inapppurchaseactivate(0)
message("Starting loop")
while getinapppurchasestate()=0
sync()
endwhile
sync()
message("Checking purchase was ok")
ok = GetInAppPurchaseAvailable(0)
message("I've returned from the purchase code, value of OK variable is "+str(ok))
So here's the outcome, on two testing devices: The very first message displays no problem ("Starting purchase routine..."), but there seems to be the slightest pause before some running background animation stops (this isn't using animated sprites, the code updates frames every cycle, and I've noticed this in other instances too but it never caused a problem). None of the other messages appear at all, including the "You are buying a product..." one (they all display fine when the purchasing code is disabled.
I'm going to play around with some timing delays and a managed product to see if I get any further, but now the billing app itself refuses to even open. :-(
On a side note, on the Note 2, when using keyboard input, the hardware back button still completely kills the app.
Player updated from the new one on the playstore also.
EDIT2:
Ok, I added a 1 second timer checked loop between each message statement, and oddly I got the second message, then the first, then the rest all seemed to work fine, but no google play interface opened up, and it crashed after the last message (which is after I should have purchased the product). It seems to skip this code altogether. Paul, in the first play around I had issues where eclipse was setting the billing api level to 1.4, and I had to change it to 1.5. Now it's downloaded updates and is defaulting to 1.7. Could this be an issue? Are the player on the google play store (dated 06/04) also fixed and ready to go?
EDIT3:
I've now tried both a managed and unmanaged product, and neither works - no purchasing interface comes up which it did for beta 8 (that's when a purchase could be made, however if you cancelled the purchase it still dies). Taking the lines out one by one, the line causing the crash is the line to activate the product, however this makes sense I guess as the purchase interface never actually displays.
The message issue still persists - if you set it to display a message every other alternating line of code with no delays between, they appear in an almost random order, depending on the functions in between them?? I assume this is because background code is executing for some commands that don't action immediately (such as network/purchasing code) and the agk app is continuing to advance?
With regard to my server connectivity issues in the other thread, all this playing around has identified what I know suspect to be the problem. The app needs to communicate with my server before it can progress, which initially seems fine....however the server seems to cease recognizing new clients after about 5 minutes. I've previously released a beta test of my app and it would happily sit there all day long when I was at my day job and I could connect throughout the day, however now I seem to have to restart it after about 5 mins of inactivity (tested with both a pc and phone based version of the app). This appears to be since beta 8 also, but I'm not sure as I ceased work on the server code until the purchasing was functional.
If there's anything I can do to help demonstrate this please let me know - I'm testing this in an effort to add functionality to my app/but also to try and help isolate the problems.