Android Google Play Implementation (leader boards, cloudSaves, SHA-1 signing)

1 favourites
From the Asset Store
Google Analytics 4 Plugin for Construct 3 enables metrics and analytics for your games easily.
  • But is it possible to export a debug APK and use that it on a phone to test leaderboards or does it always have to be signed and uploaded to Google?

    Google play service is not able to connect now in that way but if I upload it everything seems to work normally.

  • Ah, ok. So the plugin is more like mobile advert or IAP in that they don't work unless already exported to android. Ok. That's fine. I can work with that. My other questions hold. Thanks for everything Nepeo.Perhaps I'll look into linking my preview with a web setup, but for now I think I'm just going to move on with my other issues.

  • eski the APK must be signed ( with the correct key ) to work. A recent beta release added the option of signed debug APKs which are useful specifically for this situation. You can export the APK, copy it to your device, install it and then do your tests. So you don't have to go via play store release channels.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ahh that's great. Going to test that :)

  • Well, I've got the google play services working. YAY! Now, I need to decide how I am going to implement it. Let's say you have a leaderboard that you want every player to only ever have one spot on. Let's suppose this leaderboard displayed what players had the highest rate of winning games. I don't want my player to put up a new entry every game, because they would quickly fill the leaderboard if they are good. And if possible, I only want entries to last a week before diapering unless the player has updated them. Now, I don't know if that is possible with construct 3 and the google play plugin, and if not, thats ok. I have other leaderboards I can make. If anyone has and info on that, let me know

    Also, I'll bring it up again, for anyone not reading all the previous posts, there is a saved games feature in the google dev console when setting up game services, and I would like to know how it works or if any of you have ever tried to use it.

    Sorry for the strange variety of topics in this one thread. I figure at this point, it would be annoying to make a new one, and I have never used this plugin before, and am only just understanding what it can and can't do. Thanks yall.

  • eski the APK must be signed ( with the correct key ) to work. A recent beta release added the option of signed debug APKs which are useful specifically for this situation. You can export the APK, copy it to your device, install it and then do your tests. So you don't have to go via play store release channels.


    Ok, I just updated to beta and did a signed debug APK.

    The Play service launches and it all looks good but it won't let me log in. I think there is still the issue of setting the construct preview URL to the right place. Have you checked the documentation on that? Seems to be outdated.

  • OK! so, once again, I have discovered that I am an idiot. So, basically, I have learned that whenever you use the "submit score" action, It is really just updating any previous scores that you had. So If you submit a score of 10, came back an hour later and submit a score of 12, the score of 10 would disappear, and be replaced with a score of 12. I should have assumed that would be how it worked, but like I said. I'm an idiot. Also, the default tab of the built-in leaderboards display is the "today" tab. You can change it to the week or to of all-time as well, and so that also fixes my problem of wanting scores to disappear after a few days. I also discovered that the google play saved games feature has been suggested to scirra but is currently not supported. So, If anyone knows of an easy way to save players' games to the cloud, let me know. other than that, I think this thread has answered all of my questions. Thanks yall.

    Here are some places that talk about the saved games feature:

  • haypers glad you solved your questions!

    eski the preview URL only effects you if you are using the web API. If you are using the Android export and can't sign in it's most likely a configuration error, I have posted a checklist elsewhere on the forum about things to check in your config. I'm afraid I can't really search for it at the moment.

  • Cool! I found the next snag! Making progress! So, this time the problem is simple. I submit a few scores to my leaderboard about a week ago now, and It showed up the day after. I submit a better score that day, and the old one was replaced the day after. Since that day, I have tried submitting multiple better scores to the leaderboard from three different google play accounts, and none of them have shown up. The only thing I changed was a script that lists a google play error on the screen if one ever occurs. I turned tamper protection off on all leaderboards in case they were the culprit, and have never received an error. Any ideas? I have waited multiple days for these entries to show up, and have checked all my ID's twice.

  • Well, I'm still stuck. I can't figure out what is wrong. I submit the score, no errors appear, I received all player data, I just can't post any scores. Maybe it is because if you are the top score holder, you must wait to be beaten before you can post another score? IDK. If someone who is experienced with the google play leaderboards could show me a screenshot of their script, or give some insight that would be great!

  • Hi, anyone able to provide me with link on how to setup Google Play leaderboard on C3 step by step. Thanks

  • Sup man. Ya know, I never really did get the google play leaderboards to work well for me. I've begun to look into other services that use leaderboards. I haven't really worked on them at all in a long time. I had the same problem as you. Even once I had things working and had followed everyone's advice, I still had unanswered questions about how it all was supposed to work and be implemented. I'm still hoping someone will come along and send a screenshot of their code.

    I wish there was just better documentation to the plug-in and more features. I would love to use the cloud saves feature that android offers for instance, but I have no way to use it with constructs current setup (or at least that is the impression I am under).

    I freaking love to construct. I have used it for more than two years now. But there are a few things about it that I feel like are just missing. If construct had a better way to implement mobile game features such as leaderboards, saving player data to the cloud with like a firebase plugin, having a way to keep track of a players currency, or all the google play features,(preferably all in one super-simple plug-in) then I think I would praise their name until the day I die. Construct is by far the most useful and simple game dev platform I have ever used. But you can build a great game, and fail to make money off of it because construct 3 does not currently have a lot of the infrastructure that I want. I am currently trying to jump a bunch of hoops right now to get a system that keeps track of my player's currency data to work.

    IDK man. I'm sure scirra is super busy (bless those guys), but I feel like there are some end game features here that are missing.

  • I have decided to do my own leaderboard using SQL and so far it works fine for me with a few exceptions which I am now working my way through to fixing them. That includes:

    - Checking and ensuring no duplicate players names

    - Lock down hackers from been able to inject data into the database (sql injection) hence avoiding scores been altered. TBH it will be foolish for a hacker to spend his time doing that on a leaderboard. Only reason why I would want to fix this is to avoid a virus spamming my database

    - Display a dialog for player to enter name if he wants score to be submitted if first time but subsequent time only high score should be saved straight without any prompt since player already registered

    - Add a column to insert random images per players. This eliminates forcing players to register

    - Ability to display players current rank if outside the top 10 or 20 etc

  • Someone has told me the google play object isnt working on c3, is this the case? I have a mobile game on playstore using google play object. It used to work, originally uploaded in 2018, but since updating to c3 runtime, adding some bits and re exporting the signed apk, it now doesnt log in to google. It is still linked to the original sha-1. Any guidance would be lovely!

  • Wish I could help, but I've all but given up with the Google play plugin. Until scirra give it an overhaul to allow save game features, I don't want to use it. I've taken to using rex's firebase plugging pack for c3 since then for any online services.

    When you upgrades the runtime, you may have messed something up with it internally. Perhaps remove and re add the object itself. A lot of work, but it could be done. Add a comment wherever it is references, delete it, and re add it maybe?

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