• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

SOLVED How to make Google Play Services work?

P

pytong07

Guest
I have followed all the documentation on how to Google Play Services, but my game still can't login to GameServices to post achievements.

I also see such a message (see pic below) in my Play Console but none of the GameMaker Google Play Services documentation mention that. These are the steps expected by Google. Did any of you follow the steps in this document https://developers.google.com/games/services/android/quickstart#step_3_modify_your_code ?
 

Attachments

Last edited by a moderator:

Joh

Member
That's weird... doesn't clicking that missing line send you to the appropriate page to fix it?
I personally don't remember having to do something specific to "clear" that missing step.
  • do you have the extension in your game?
  • is your game id (from playgames) in your android settings?
  • did you upload the game to the store (not necessarily public/published)
    • did the uploaded file have the first two points covered
  • maybe its completing the "properties" with edit properties.
From memory (but I could be wrong) googleplay can and does detect the internal content of your apk (aab) and i think it just understands your apk uses the sdk when you upload a file with the extension and matching game id.

Hope this helps
 
P

pytong07

Guest
Thanks for your help!

Clicking the missing line sent me to https://developers.google.com/games/services/android/quickstart#step_3_modify_your_code
  • do you have the extension in your game?
    • Yes, I have imported Google Play Services Extension to my game
  • is your game id (from playgames) in your android settings?
    • Yes, the game id is in my android settings
    • Just want to confirm, is the game id actually the "Project ID" in Google Play Console? It should be a 12 digit number right?
  • did you upload the game to the store (not necessarily public/published)
    • did the uploaded file have the first two points covered
    • Yes, I updated the game to the store with the first 2 points covered
  • maybe its completing the "properties" with edit properties.
    • for the properties, I didn't enter it manually, I linked it. See pic below. So I think it should be correct.
 

Attachments

Last edited by a moderator:

Joh

Member
Mmm.. seems like everything is in order. (yes it was the 12 digits)
I do not use firebase however so maybe that is what causes the issue.
In the picture, it does say to follow [linked] instructions to complete the integration. I wouldn't know what that entails but maybe the solution is there.

while searching for the solution to my own problems, I had stumbled on this:
where the solution seemed to have been adding the sha1 to firebase too.
but as I said, never used firebase so I cant be sure.

Hope this helps.
 
P

pytong07

Guest
It is weird but from the way it sounds "Add the Play Games Services SDK to your production APK to use the APIs", maybe somehow the game can't find the GooglePlayServicesExtension.

Is importing GooglePlayServicesExtension enough? I use this one https://marketplace.yoyogames.com/assets/2008/google-play-services

When I clicked GooglePlayServicesExtension, this opened up (see pic below). I am pretty sure the Play Game Services SDK was included because of these 2 lines.
GML:
compile 'com.google.android.gms:play-services-games:16.0.0'
compile 'com.google.android.gms:play-services-auth:16.0.1'
 

Attachments

Last edited by a moderator:
P

pytong07

Guest
I figured out some more.

GML:
show_debug_message("Signing-in to Google Play Services");

// Try to connect once...
if (GooglePlayServices_Status() != GooglePlayServices_SUCCESS) { GooglePlayServices_Init(); }

// ...And then confirm all is okay or handle a fail
if (GooglePlayServices_Status() == GooglePlayServices_SUCCESS) {
    achievement_login();  
}
else { show_message("Error initialising Google Play Services, status code = " + string(GooglePlayServices_Status())); }
achievement_login(); is the line that is failing. Just not sure why this line is failing.
Here is the error.
Code:
 Silent sign in failed, attempting normal sign in.. Current Status 0.0
 

Joh

Member
Yes, it does seem like everything is proper on your side. Did the "add play game sdk" step get cleared?
I think the last mismatch possible is the package name. Maker sure the package name in Game Maker is the same as in play services.

What happens when it fails? do you get any prompt at all?
The message is only saying it failed at "stealth" login and thus is trying the normal one.

Normal loading should have a playstore overlay take over and ask you to login. does that happen?
there should be another message a bit after saying the result that one should say what went wrong.

do you get another message with the result of the attempted loading?
 
P

pytong07

Guest
I made the mistake of using the "Upload key certificate" instead of the "App signing key certificate" when I was adding credential in Google Play Services. Now the warning "Add the Play Games Services SDK to your production APK to use the APIs", which was in Google Play Services earlier is gone. That's some achievement here :)

Just that I still can't login in yet. When I logged in, there was a white box, pressing on the white box triggered another box to open with all my google login accounts. After I have chosen an account, it just keeps spinning. I don't really see any message as the only way I can test is using the test apk downloaded from Google Play Store's internal testing track. So I don't really see any log. Were you able to see the log when you were testing achievement_login()?

I have published the new credential, and then re-uploaded my game to Google Play already. Maybe I just have to wait a bit more ... will let you know.
 
P

pytong07

Guest
@Joh Thank you for much for your help. IT FINALLY WORKS!!!!

So I made a mistake with the key, I used "Upload key certificate" (wrong). I should have used "App signing key certificate" when setting up my credentials in the Google Play Store.
 

Joh

Member
Happy for you!
I feel the whole playstore set up is quite a mess. Integrating using the functions is very simple and straightforward, but so many things can go wrong in the linkage and there's so little to go by. especially since we use the double black box of GMS + Extension; most help has android studio in mind.

the whole key thing is still confusing to me, but I just put both.

the infinite spining is the issue I was having and it got fix by updating my phone(after my own share of trying everything)... same problem, two totally unrelated solutions.

random pro-tip I noticed: if you run your game (or any game) from game maker and thus have access to the console (see the debug info). If you keep it connected, download the game from the store, you are able to see the logs.(seems to work with totally unrelated apps too)

Wish you the best
 
Top