Google Play Highscore

Get help using Construct 2

Post » Sun Oct 16, 2016 6:54 pm

Is it best to use the default Construct 2 Google Play object or Cranberry? This is for the Android mobile phone, not Apple. These are the functions:

How would you do these things?

* Press a button, submit high score. Same button, if pressed and not signed into Google Play, prompt sign on. Upon successful sign in, automatically submit high score.

* Press button, display high score.

Basically, for the phone can the default Google Play object do these functions, or is Cranberry better? How would I test this? would I have to upload to Google play first or can I test using the normal game test function?
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Sun Oct 16, 2016 8:50 pm

It's all in the manual, including how to test in preview mode : https://www.scirra.com/manual/175/google-play
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Fri Oct 21, 2016 8:18 pm

I found it:

Extra steps for Cordova
Google Play Game Services are designed to work in a web browser, but it's possible to also configure it to work in Cordova (e.g. when exporting to mobile via PhoneGap Build or the Intel XDK). To set it up for Cordova you'll also need to:

Fill in the Client secret property with the value from the Google Play Developer Console.
Add http://localhost as one of the redirect URIs in the API console.
Remove any uses of On auto-sign in failed. It never triggers in this mode, so you will need to rely on having manual sign-in instead.

Client secret property? Redirect URI API console? I do get Auto-sign in fail, but i dont get the client secret property or redirect URI API, sorry. I have no idea where to find the Client secret property or redirect URI API.


I found the Client ID thing. Where in Construct 2 do I put it? I found the Client ID, but it says view Client Secret ID in API Manager, I clicked but there is no Client Secret ID in the API Manager.
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Fri Oct 21, 2016 8:53 pm

Sorry for asking, I followed the Construct 2 tutorial and it mentioned a Client Secret ID. I went to Google play and there is no Client Secret ID.
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Sun Mar 05, 2017 12:34 am

@Phoenixbowman

Did you ever find the Client Secret ID??????
B
82
S
32
G
7
Posts: 281
Reputation: 10,685

Post » Thu Mar 09, 2017 9:14 pm

I didn't need the secret client ID. in the Google Dev console there is a number that you put into the Cordova Game plugin. The Android google play services ap id . That's all I needed in order to get the game to work. You have to upload an actual apk I think before you get one. Then you can use that to integrate the Cordova Game plugin in your game with Google Play.

If you go to Game Services and select a game, or add a game, you will then get a number. It's in the upper left hand corner under the name of your game when you are in Game Services and you have the game selected. That's the number you put into the Cordova Plugin in your game. Thats how the plugin connects with Google Play in terms of Leaderboards, Achievements, etc.

If you use Intel XDX, when you add the third-party Cordova Game plugin, it asks for the game ID. It's the same number. You can copy and paste it from the game itself, from the plugin, or from the google play dev. console.
B
20
S
7
G
3
Posts: 302
Reputation: 3,634


Return to How do I....?

Who is online

Users browsing this forum: Lancifer, Yahoo [Bot] and 59 guests