Help with CordovaGame and CordovaiAP

Get help using Construct 2

Post » Tue Dec 13, 2016 1:25 am

Artpunk wrote:
CanGame wrote: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
B
22
S
7
G
5
Posts: 100
Reputation: 6,272

Post » Tue Dec 13, 2016 3:40 am

@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.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Tue Dec 13, 2016 4:06 am

jeffige wrote:...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.
B
70
S
50
G
60
Posts: 400
Reputation: 37,759

Post » Tue Dec 13, 2016 2:47 pm

Artpunk wrote:
jeffige wrote:...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?
B
22
S
7
G
5
Posts: 100
Reputation: 6,272

Post » Wed Dec 14, 2016 12:24 am

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.
B
70
S
50
G
60
Posts: 400
Reputation: 37,759

Post » Wed Dec 14, 2016 12:42 am

Artpunk wrote: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.


oh no i meant what does it show for you in the installed section of the plugins page for cocoon
heres what i mean. I get the git url automatically for iap if i keep the config file from exporting from construct 2
Image
B
22
S
7
G
5
Posts: 100
Reputation: 6,272

Post » Wed Dec 14, 2016 12:49 am

Artpunk wrote:...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.

So I have CordovaiAP working on iOS. Now im having trouble connecting to GameCenter for achievements.
I think I can say categorically that the official GameCenter plugin doesnt work. It wont authenticate the user.
Im using it exactly as it says in the manual:

On start of layout > authenticate user

Doesn't authenticate, so im switching to Cranberry's CordovaGame... see if that works.
B
70
S
50
G
60
Posts: 400
Reputation: 37,759

Post » Wed Dec 14, 2016 1:00 am

CanGame wrote:oh no i meant what does it show for you in the installed section of the plugins page for cocoon
heres what i mean. I get the git url automatically for iap if i keep the config file from exporting from construct 2

Well if you want to use Cranberry's Cordova iAP then you'll need to link to the associated git url. But if you use the Cocoon iAP plugin, youll want to remove any reference to Cranberry's. Many of the plugins in the screencap Cocoon just ads by default, you need them.
B
70
S
50
G
60
Posts: 400
Reputation: 37,759

Post » Wed Dec 14, 2016 1:02 am

Artpunk wrote:
Artpunk wrote:...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.

So I have CordovaiAP working on iOS. Now im having trouble connecting to GameCenter for achievements.
I think I can say categorically that the official GameCenter plugin doesnt work. It wont authenticate the user.
Im using it exactly as it says in the manual:

On start of layout > authenticate user

Doesn't authenticate, so im switching to Cranberry's CordovaGame... see if that works.


authenticate should be working i usually activate it at start of layout on titlepage but i tested this on intel xdk not cocoon.io so may not work on cocoon.io.
How did you get iap to work on ios? my iap is still not working on android wondering if i messed up the installed plugins page by using c2's exported config file
B
22
S
7
G
5
Posts: 100
Reputation: 6,272

Post » Wed Dec 14, 2016 1:05 am

cocoon.io googleplay and gamecentre plugins works if you login user on start of layout in your titlescreen before submitting any scores/achievements
B
22
S
7
G
5
Posts: 100
Reputation: 6,272

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: ditocruz, uzumiapps and 27 guests