IAP is Impossible in Construct 2

0 favourites
  • 6 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • I've come to the conclusion IAP is impossible in Construct 2. It's a pain in the ** and does not work reliably. I did On start of layout add and request. then i have a button that says on click buy ID and the button doesn't work.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Just in case the person isnt online when the On start of layout triggers, i had the button do Request store listing and buy product, but that crashed the game. So basically internet is needed on at all times so On start of layout request catches.

    Theres no way to put it in so a button requests store listing.

  • java.lang.IllegalStateException: Can't start async operation (launchPurchaseFlow) because another async operation(refresh inventory) is in progress.

    at com.smartmobilesoftware.util.IabHelper.flagStartAsync(IabHelper.java:821)

    at com.smartmobilesoftware.util.IabHelper.launchPurchaseFlow(IabHelper.java:375)

    at com.smartmobilesoftware.util.IabHelper.launchPurchaseFlow(IabHelper.java:340)

    at jp.wizcorp.phonegap.plugin.wizPurchase.IAP.buy(IAP.java:348)

    at jp.wizcorp.phonegap.plugin.wizPurchase.IAP.access$200(IAP.java:43)

    at jp.wizcorp.phonegap.plugin.wizPurchase.IAP$3.run(IAP.java:326)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)

    at java.lang.Thread.run(Thread.java:818)

  • It's your code.

  • It works! I tested it without Internet on till I got to the button to buy, and it still works!

    With google play, you need to set up a Consume product ID. I did it with a button that on click Consume product ID. I also set up a text box that said DING (yes, ding in all caps) to made sure it worked. I had it so on Consume Product ID success, set text box with DING to visible (the box invisible to start with.)

    To make sure it worked, i temporarily set on purchase ID succeed to set text box to visible It worked multiple times. I would do a test buy, click to consume product. After I did that, I was able to buy the product ID in a test purchase.

    Google play doesn't let developers cancel test purchases from the dev. console. So i set up a Consume Product so i could keep testing it.

  • It works! I tested it without Internet on till I got to the button to buy, and it still works!

    With google play, you need to set up a Consume product ID. I did it with a button that on click Consume product ID. I also set up a text box that said DING (yes, ding in all caps) to made sure it worked. I had it so on Consume Product ID success, set text box with DING to visible (the box invisible to start with.)

    To make sure it worked, i temporarily set on purchase ID succeed to set text box to visible It worked multiple times. I would do a test buy, click to consume product. After I did that, I was able to buy the product ID in a test purchase.

    Google play doesn't let developers cancel test purchases from the dev. console. So i set up a Consume Product so i could keep testing it.

    Mind if I could get a screenshot or CAPX so I can add IAP to my game? I want to make sure Im not making any mistakes

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)