-
IAP problem
Hi Everyone,
I am trying to add a check for my IAP store. I am using the "Can Payments be made?" condition as a gatekeeper for my shop. My events look like this:
+Button is pressed
+Can payments be made?
- Open shop
+Button is pressed
+Can payments be made? (NEGATE)
- Open popup message "Connect to the internet"
It seems that no matter what, the button produces no results. According to the docs, this condition checks for internet connection. Is there some other thing on the device that needs to be enabled for the condition to return true? I am testing this on a sandbox account using wifi on an ipod5.
Any insight is appreciated,
Reg
-
By pressing the button, neither the shop nor the popup message displays? Am I understanding correctly?
I would try the following: set a flag if payments can be made or not. And test for that flag when pressing the button. You could also enable/disable the button according to the "Can payments be made?" condition. That's what I am doing and it works well in sandbox.
-
Yea, neither of them displays. I was assuming that a negated condition would act as a "False" return, and would therefore open the popup message. I'll try a "middleman" flag as you suggested and see if it works.
Thanks,
Reg
-
The flag solution doesn't change anything. I can't tell if this condition is actually doing anything, but since the flag should be false by default, I would expect the popup to display. Unfortunately, it does not display. Nothing displays. Sadly, I can't test any of this on PC, since that flag always returns true (unless that is supposed to be the case).
-
Ah yes, this condition is always true with the Windows runtime. This should be added to the Help file.
-
Mobichan - stick a sample in there to play as the first action, that way you'll be able to audibly tell whether or not the event has started executing; if it does then the conditions were met...
-
There is a sample in there, but alas (on device) nothing plays. :'<
-
I am just now realizing that I am requesting 3 product information actions in a single event and that might not be a good approach. Is this something that needs to be cued up so that I only request one at a time and then on receiving the first item's info, I then request the next in the cue? Has anyone got a successful approach they can share?
-
You can request any amount of product information simultaneously. IIRC Anders is doing it in his IAP example. Works great.
-
Thanks. I just noticed that example and was looking at what he did. Since my code needs to have all the prices before drawing the screen, I am trying to pause player input while they wait for the prices to come from Apple's server. Although this could potentially take a while, I am gating the player's control by waiting for the "On request response" for each item to be sent. When all 3 come back, then the shop should be displayed.
Can anyone give a rough estimate how long it takes for sandbox prices to be received? I only have 3, but I wanted to make a timeout for this in case someone waits too long for the data. I have it set to 20 seconds right now, but the prices are never received.