I've integrated Google Play Game Services in my game. I've put a login button and leaderboard & achievement buttons. I've coded it so that only when CocoonJS -> On Login Succeeded then leaderboard and achievement buttons are enabled. The problem is that suppose a player logs into Google Play Game Services, now leaderboard and achievement buttons are enabled. Now he quits the game and re-opens it. He is already logged into the game (Welcome XYZ appears at the time of ludei splashscreen), but inside the game, the leaderboard and achievement buttons are disabled because It could not detect that player is already logged in. So, the player has to click the LOGIN button. Then, the other buttons are unlocked.

I tried to do this:On start of layout: CocoonJS -> On Login Succeeded: Set global variable "loggedIn" to 1. If loggedIn is 1 then enable leaderboard and achievement buttons.

It is a shame they don't have this condition added already. I don't even know any javascript and I was able to fix the problem. You'll need to modify the cocoonjs 'edittime.js' and 'runtime.js' files. I looked at putting it on the ludei/cocoonjs github page but I can't figure the damn thing out and have no patience for it...

I will post some screenshots of what you gotta do. It's not much. Just keep in mind that if you ever install an updated version of C2 or cocoonjs plugin, you will have to add the lines again or you could have issues. And make sure to back up the original edittime.js and runtime.js files before you tinker.

Just a reminder: since you are going to be editing some javascript files here, if you ever update C2 or the CocoonJS plugin, you will have to make these same edits again (or end up suffering from issues/bugs).

Hey ! I saw that you have a working Google play leaderboard exported using cocoonjs right ? I am facing problem with Leaderboard, it doesn't show up on my Apk. It only makes login, i can't submit or retrieve highscore. Any help will be appreciated. Ciao !