Can't get Google Play plugin to work

0 favourites
  • 1 posts
From the Asset Store
Google Analytics 4 Plugin for Construct 3 enables metrics and analytics for your games easily.
  • Hello! I am having troubles making the Google Play plugin to work. I am testing it now on a very simple game and I would really appreciate if someone can tell me what I am doing wrong. The game is just you pressing a button which increases a variable by one. When you press submit it should send the score to a leaderboard on Google Play and when your click another button you should retrieve that leaderboard. That's it! The code is like this:

    Global number score = 0

    (Google Play) On loaded

    ...(Google Play) Is loaded -> (Google Play) Sign in

    (Increase Button) On clicked -> (System) Add 1 to score

    (Submit Button) On clicked -> (Google Play) Submit score score (tag "") to leaderboard "leaderboardName"

    -> (System) Set score to 0

    (Leaderboard Button) On clicked -> (Google Play) Request public all-time hi-scores from "leaderboardName" (25 results, top)

    I exported it as Android (Cordova) -> Unsigned release APK. I signed it using these terminal commands (on Mac):

    keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

    jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name

    ./zipalign -v 4 Project1.apk Project1-aligned.apk

    I uploaded it on Google play (Clicked on Create application and followed the normal steps) and it is in the store. After that, in my Google Play account I went to Game Services, clicked on ADD NEW GAME, I added it and linked it to the game itself (from the android store, using the package name). Then I went on and created a leaderboard and used its name in my code (instead of "leaderboardName"). Then in Construct 3, in my Google Play object, I filled in my Application ID as it appears in Google Services, my Client ID, using my OAuth2 Client ID and my game ID using my package name (com.name.name). After I did all these (and changed the version of the code), I exported it again, signed it again and re-uploaded in on google play. When I download it, the game starts and the screen gets a bit dimmer as if something would be loading but nothing shows, and the game continues without any error (I should have had an automatic Log In, but it doesn't happen). Also when I try to submit the score or retrieve the leaderboard, nothing happens either. I am trying to figure this out for more than 2 weeks. Can someone please tell me what is wrong about my implementation or what else should I do in my Google Play account to make this work? Thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)