How do I add In App Purchases for Android?

0 favourites
  • 13 posts
From the Asset Store
Kids Game
$49 USD
New Sounds Added Update: 115 new sound effects added for no additional cost!
  • Hi all,

    I was hoping someone can point me in the right direction. What is the recommended way to export your game for Android and have IAP with the Google Play store? I see that CocoonJS is a popular way, but isn't there a way to do this through Intel XDK using the Crosswalk Build? Anyways, I'm at a loss for finding the correct way to do this. There seems to be a lot of options out there, but I don't want to waste time going down the wrong path...

  • In the tutorials : How to use AdMobs and IAP official plugins on Android Crosswalk/Intel XDK.

    CocoonJS support has been officially dropped more than a year ago now.

  • awesome, and thank you!

  • What order do you put them in, though? On Store Listing Success can't be made as a sub-event, so how do you know it's being called?

    If purchase successful > go to Layout X

    Global variable = x, check purchase if true, go to Layout X (If the device is already connected to the internet.)

    Click button, check purchase if true, go to Layout X. (If they are not connected to the internet, the player would need to connect their device to the internet before clicking the button.)

    ^ How to do those three things?

  • In the tutorials : How to use AdMobs and IAP official plugins on Android Crosswalk/Intel XDK.

    CocoonJS support has been officially dropped more than a year ago now.

    Hello Kyatric. I noticed plenty of the users are turning to Cadburry Games' IAP plugin.

    Is C2's IAP plugin still up-to-date?

    Sorry if I have to ask but I can't test right now because I'm using an unstable connection.

  • MPPlantOfficial: As far as I'm aware it still should be.

    Phoenixbowman: "On Store Listing Success" is an event that will be triggered once the action "Request store listing" has been executed. Than on the tick of execution where the listing is returned and is true the condition will trigger.

    Purchase successful happens after you have used the action "Purchase product".

    In your second case you should rather be looking for the "Has product" condition rather than "Purchase successful", since you want apparently to check if your user already has bought a specific product in the past, not right now.

    Same for your third case.

    To check whether they are connected to internet or not, you should handle that test yourself, using the Browser plugin and the condition "Is online".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • MPPlantOfficial: As far as I'm aware it still should be.

    Hey Kyatric. Tried to build today. Build Failed.

    Here's the log:

    Plugin "cordova-plugin-device" (1.1.1) installed.

    Plugin "com.smartmobilesoftware.androidinappbilling" (3.0.2) installed.

    Plugin "cordova-admob-sdklibs" (2.1.4) installed.

    Plugin "cordova-plugin-admob-simple" (3.0.4) installed.

    Plugin "cordova-plugin-whitelist" (1.2.1) installed.

    Error: Plugin cc.fovea.cordova.purchase failed to install. Error: Plugin com.mcm.plugins.androidinappbilling failed to install.

    Plugin "cordova-plugin-inappbrowser" (1.4.0) installed.

    Plugin "cordova-plugin-crosswalk-webview" (1.5.0) installed.

    Will try to install this cc.fovea thing but it failed last week.

  • Tried another build. I found the CC. fovea thing and inputted my Billing Key and I'm getting this:

    Plugin "cordova-plugin-device" (1.1.1) installed.

    Plugin "com.smartmobilesoftware.androidinappbilling" (3.0.2) installed.

    Plugin "cordova-admob-sdklibs" (2.1.4) installed.

    Plugin "cordova-plugin-admob-simple" (3.0.4) installed.

    Error: Plugin Purchase failed to install.

    Plugin "cordova-plugin-whitelist" (1.2.1) installed.

    Error: Plugin com.mcm.plugins.androidinappbilling failed to install.

    Plugin "cordova-plugin-inappbrowser" (1.4.0) installed.

    Plugin "cordova-plugin-crosswalk-webview" (1.5.0) installed.

  • I am still facing this issue ???

    let me know if there is any other solution to this ????

  • I am still facing this issue ???

    let me know if there is any other solution to this ????

    Check out my thread here which no one wants to reply to:

    EVEN IF you find the whole mcm.plugin thing, the build will still fail.

    Guess this is why people are turning to the cadburygames plugin.

  • Check out my thread here which no one wants to reply to:

    What kind of answer are you expecting in that thread ?

    It is half caps locks, half "solution" to an apparent problem you are seemingly having.

    As usual, if you encounter a bug issue with Construct2 consider posting a bug report for it following the report guidelines.

    In that case, possibly the IAP plugin that Construct 2 attempts to go for on its own (when exporting to Cordova, C2 is building an XML file attempting automatically to fetch specific Cordova plugins) perhaps it needs some update and so, possibly Ash needs to be noticed about it.

  • > Check out my thread here which no one wants to reply to:

    >

    What kind of answer are you expecting in that thread ?

    It is half caps locks, half "solution" to an apparent problem you are seemingly having.

    As usual, if you encounter a bug issue with Construct2 consider posting a bug report for it following the report guidelines.

    In that case, possibly the IAP plugin that Construct 2 attempts to go for on its own (when exporting to Cordova, C2 is building an XML file attempting automatically to fetch specific Cordova plugins) perhaps it needs some update and so, possibly Ash needs to be noticed about it.

    Maybe a confirmation that either the plugin is indeed bugged but I've seen it been brushed off as a bug in XDKs side which I'm attempting to find the solution to. I tried a "solution" listed here:

    http://www.html5gamedevs.com/topic/1257 ... omplished/

    Which again resulted in a failed build.

    Using Crosswalk Embedded 16

    Error: Could not fetch plugin "cc.fovea.cordova.purchase".

    Plugin "cordova-plugin-device" (1.1.1) installed.

    Plugin "cordova-admob-sdklibs" (2.1.4) installed.

    Plugin "cordova-plugin-admob-simple" (3.0.4) installed.

    Plugin "cc.fovea.cordova.purchase" (6.0.0) installed.

    Error: Plugin Android InAppBilling failed to install.

    Plugin "cordova-plugin-whitelist" (1.2.1) installed.

    Plugin "cordova-plugin-inappbrowser" (1.4.0) installed.

    Plugin "cordova-plugin-crosswalk-webview" (1.5.0) installed.

    FETCH error? But the plugin is in the folder. <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">((((

  • its useless actually to give this plugin a try !!!

    Until we find a solution to get it working ...........

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