Help with CordovaGame and CordovaiAP

0 favourites
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Artpunk

    So...still working on figuring out how to get these to work with intel xdk and google play store. I know i'm messing something up somewhere.

    Any help is appreciated.

  • So what stage are you at. Youve started setting up the listing on the Google Play Dev Console?

    Here are some steps that you need to do:

    -In your C2 project, in the properties of CordovaGame object, you have to add the APP ID. You get this from the Dev Console.

    -In the Dev Console you have to set up Google Play Services for your game to get the APP ID number that you need. The number is below the title of your game in Game Services.

    -In XDK you also need to add the CordovaPlay plugin.

    So in XDK > Plugin Management > Add 3rd party plugin > select 'git repo' > enter: https://github.com/cranberrygame/cordov ... n-game.git

    AND in the variable field for APP_ID, you need to enter the same APP ID you got from Google Play Services above.

    Have you done these steps?

  • So what stage are you at. Youve started setting up the listing on the Google Play Dev Console?

    Yes. I've done the console listing. Added achievements, testers (only myself so far) and set up google merchant, game services.

    Here are some steps that you need to do:

    -In your C2 project, in the properties of CordovaGame object, you have to add the APP ID. You get this from the Dev Console.

    Done.

    -In the Dev Console you have to set up Google Play Services for your game to get the APP ID number that you need. The number is below the title of your game in Game Services.

    Done. But i got an error that said there was a problem with that ID.

    Wait...what? Cordova Play Services? Haven't seen that plugin. Is that part of cranberrygame's plugins? I only have the CordovaGame plugin from him.

    -In XDK you also need to add the CordovaPlay plugin.

    So in XDK > Plugin Management > Add 3rd party plugin > select 'git repo' > enter: https://github.com/cranberrygame/cordov ... n-game.git

    AND in the variable field for APP_ID, you need to enter the same APP ID you got from Google Play Services above.

    This is one of the major issues. I don't think i have seen those two instructions on the same page.

    Have you done these steps?

    Most of them. Will go back into C2 and add/edit those things.

    Thanks for the help and the information Artpunk

  • > -In the Dev Console you have to set up Google Play Services for your game to get the APP ID number that you need. The number is below the title of your game in Game Services.

    >

    Done. But i got an error that said there was a problem with that ID.

    Wait...what? Cordova Play Services? Haven't seen that plugin. Is that part of cranberrygame's plugins? I only have the CordovaGame plugin from him.

    Sorry for confusion... When I wrote Google Play Services I meant to say Google Game Services in the Developer Console. You have already set it up obviously since you said youve set up your achievements, and you said you put the App Id dumber into the CordovaGame object in C2.. so you've done it already.

    And that same number you copied to the CordovaGame object, you also copy into the plugin in XDK.

    What are you specifically having trouble with? Like, whats not working? Are you getting a build error in XDK or something?

  • Artpunk

    The first few times i built with xdk i got errors, mostly with the androidinappbilling. I actually took out the cordovagame and it went away.

    I tried with both official and cordova plugins but i still got the same error. Right now i just have the cordovaAdmob and cordovaIAP.Build went through.

    I think i have problems with some of my logic, cause once i downloaded the .arm7 to my phone, i have several issues with some buttons. Mainly the options with turning music and sound off.

    Also, the mobile keyboard overlaps the textbox for the player to input their name.

    Gonna try and edit some things today, hopefully. And go back and try and add and correct the cordovagame with your suggested post.

    I published the alpha test yesterday but none of my testers can download it. It says 'app not available'.

  • Artpunk

    The first few times i built with xdk i got errors, mostly with the androidinappbilling. I actually took out the cordovagame and it went away.

    I tried with both official and cordova plugins but i still got the same error. Right now i just have the cordovaAdmob and cordovaIAP.Build went through.

    I think i have problems with some of my logic, cause once i downloaded the .arm7 to my phone, i have several issues with some buttons. Mainly the options with turning music and sound off.

    Also, the mobile keyboard overlaps the textbox for the player to input their name.

    Gonna try and edit some things today, hopefully. And go back and try and add and correct the cordovagame with your suggested post.

    I published the alpha test yesterday but none of my testers can download it. It says 'app not available'.

    I have the same issue as you with the official plugin and the cordova one there doesnt seem to be a proper answer if there is any working in-app plugin currently or not.

  • I was unable to get the official iAP object working. According to posts I read on the forum some of the conditions don't work with the offical iAP, like 'On purchase success'. According to a post I read by Kyatric you can get it working by using the 'has product id' condition, but I wasn't able to get it working with that.

    So I switched to using the Cranberrygame CordovaiAP plugin. I have that working for Android, but I haven't yet succeeded in getting it to work for iOS.

    I'll be working on this exact problem today. I *think* other people have the CordovaiAP working on iOS, but im currently looking into it.

    Two useful example capx files can be found in this tutorial by Kyatric and the 'CordovaInApp' example posted by

    These two files should give you an idea of how to set up the events to get iAP working.

    I'd be very interested to hear advice from anyone who has the CordovaiAP working with iOS.

  • I was unable to get the official iAP object working. According to posts I read on the forum some of the conditions don't work with the offical iAP, like 'On purchase success'. According to a post I read by Kyatric you can get it working by using the 'has product id' condition, but I wasn't able to get it working with that.

    So I switched to using the Cranberrygame CordovaiAP plugin. I have that working for Android, but I haven't yet succeeded in getting it to work for iOS.

    I'll be working on this exact problem today. I *think* other people have the CordovaiAP working on iOS, but im currently looking into it.

    Two useful example capx files can be found in this tutorial by Kyatric and the 'CordovaInApp' example posted by

    These two files should give you an idea of how to set up the events to get iAP working.

    I'd be very interested to hear advice from anyone who has the CordovaiAP working with iOS.

    alright awesome i guess ill purchase the cranberry pack and check out iap as well and see if i can get ios to work too

  • The first few times i built with xdk i got errors, mostly with the androidinappbilling. I actually took out the cordovagame and it went away.

    About this problem I think that error is related to the iAP object, not the CordovaGame plugin which is used for connecting with GooglePlay, Leaderboards and Achievements.

    Which plugins do you have added in XDK currently? And which iAP are you currently trying to get working, the official iAP object or Cordova iAP?

    Another thing to check, do you have an account set up on Google Payment Center? In the Dev Console there's a link at the bottom of the screen under 'Useful Tools'. You have to set up an account in there to be able to receive payments. If you didnt have that account set up, *maybe* that could be causing your error?

  • alright awesome i guess ill purchase the cranberry pack and check out iap as well and see if i can get ios to work too

    This thread had some useful information:

    Official IAP Trigger Events Not Working Dec 2015

    OP said he managed to get the official iAP working by swapping 'on purchase success' conditions for 'has product'.

    I tried what he describes, and tried to copy his event system that he outlines, but with no success.

  • > alright awesome i guess ill purchase the cranberry pack and check out iap as well and see if i can get ios to work too

    >

    This thread had some useful information:

    Official IAP Trigger Events Not Working Dec 2015

    OP said he managed to get the official iAP working by swapping 'on purchase success' conditions for 'has product'.

    I tried what he describes, and tried to copy his event system that he outlines, but with no success.

    Yea i looked into the official iap it hasn't unfortunately been updated in a long time and due to the new os for android and ios alot of things seem to not trigger and the most important one being on purchase success

  • Artpunk

    I went back to a pre-plugins project. And yes, I have the google dev console, merchant account, and Admobs Ads account. All have been setup.

    After publishing an alpha test on the play store, i'm going back and redoing everything (not the game itself). Deleted the app within admobs, dev console and play game services. My testers couldn't get the alpha test, kept saying app is not available.

    I'll be using only cranberrygame's cordova plugins: CordovaAdmob, CordovaIAP, CordovaGame. The one thing that confuses me is where to get the "Android Application License Key " for the CordovaIAP. One post says its the super long key that says:

    YOUR LICENSE KEY FOR THIS APPLICATION

    Base64-encoded RSA public key to include in your binary. Please remove any spaces. in the Services & APIs.

    Another one says its a 16 digit number. Couldn't get neither to work.

    It'll probably be a day or two before i can go forward. My laptop is dying and need to find a place to charge it.

    Thanks for all the input, brothers.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ...The one thing that confuses me is where to get the "Android Application License Key " for the CordovaIAP. One post says its the super long key that says:

    YOUR LICENSE KEY FOR THIS APPLICATION

    Base64-encoded RSA public key to include in your binary. Please remove any spaces. in the Services & APIs.

    Another one says its a 16 digit number. Couldn't get neither to work....

    Its the first one you mention. The super long one. Thats the number Im using in the CordovaIAP and I actually have that working in the Android version of my game.

    If you couldnt get either to work it must be due to how you have the events for iAP set up in your game project.

    Did you see the links I posted to example capx's a few posts back. They are helpful for demonstrating how to set up the events for iAP. Check em out if you havent already and copy how they implement iAP.

  • > ...The one thing that confuses me is where to get the "Android Application License Key " for the CordovaIAP. One post says its the super long key that says:

    >

    > YOUR LICENSE KEY FOR THIS APPLICATION

    > Base64-encoded RSA public key to include in your binary. Please remove any spaces. in the Services & APIs.

    >

    > Another one says its a 16 digit number. Couldn't get neither to work....

    >

    Its the first one you mention. The super long one. Thats the number Im using in the CordovaIAP and I actually have that working in the Android version of my game.

    If you couldnt get either to work it must be due to how you have the events for iAP set up in your game project.

    Did you see the links I posted to example capx's a few posts back. They are helpful for demonstrating how to set up the events for iAP. Check em out if you havent already and copy how they implement iAP.

    For cocoon.io android, which plugins do i install in cocoon.io and which should i remove?

  • If you're using Cocoon you have options. As far as I understand Cranberry's Cordova plugins will work with Cocoon, but they also have their own plugins for all the essential stuff (GooglePlay, iAP, Ads). So you choose which plugins you want to use. I was testing out Cocoon a while back and I had it working well with the following plugins:

    -Cranberry Chartboost plugin for ads

    -Cranberry GoogleAnalytics plugin (has since stopped working, needs to be updated by Cranberry)

    -Cocoon's Google Play plugin to do achievements.

    At that time I wasn't testing iAPs so I can't comment on that.

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