• 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.

Android Achievements will not give to player

V

Verilyzed

Guest
hello,
i want to give my players a achievement to log in. I followed this:
https://help.yoyogames.com/hc/en-us/articles/360004359392-Android-Google-Play-Services-Achievements

My Code in Create Event:
Code:
global.PlayerConnected = false;
cloud_sync_id = -1;
cloud_save_id = -1;

if (achievement_available() && global.PlayerConnected == false) {
    if (!achievement_login_status()) {
         achievement_login();
         show_debug_message("Logging Player In");
        } else {
             global.PlayerConnected = true;
             cloud_sync_id = cloud_synchronise();
             show_debug_message("Player Logged In!");
            
             achievement_post("achievement_a_nice_beginning", 100);
            }
    } else {
         show_debug_message("Cannot Connect To Google Play");
        }
My Async Social event:
Code:
if (ds_map_exists(async_load, "id")) {
    if (async_load[? "id"] == achievement_our_info) {
         global.PlayerName = async_load[? "name"];
         cloud_sync_id = cloud_synchronise();
         show_debug_message("Player Logged In Correctly");
        
         achievement_post("achievement_a_nice_beginning", 100);
        }
    }
Any suggestions?
 
V

Verilyzed

Guest
I Also want to send a leaderboard

Code:
05-11 17:25:56.528 32056 32144 I yoyo    : SendHighScore(leaderboard_money,200)
05-11 17:25:56.528 32056 32056 I yoyo    : Could not post score - not signed in.
05-11 17:25:56.562 32056 32144 I yoyo    : SendHighScore(leaderboard_money,200)
05-11 17:25:56.562 32056 32056 I yoyo    : Could not post score - not signed in.
You see that it says that im not logged in

Another thing i noticed
Code:
05-11 17:25:47.687 32056 32144 I yoyo    : AchievementLogin()
05-11 17:25:47.688 32056 32144 I yoyo    : Logging Player In
05-11 17:25:47.688 32056 32056 I yoyo    : Signing in..
05-11 17:25:47.690 32056 32144 I yoyo    : android.software.leanback = 0
05-11 17:25:47.690 32056 32144 I yoyo    : MANUFACTURER = samsung
05-11 17:25:47.996 32056 32056 I Ads     : Updating ad debug logging enablement.
05-11 17:25:48.060 32056 32056 I Ads     : Use AdRequest.Builder.addTestDevice("9560BED46FC8345FFB756F11EA4BE422") to get test ads on this device.
05-11 17:25:48.097 32056 32457 W Ads     : Invoke Firebase method getInstance error.
05-11 17:25:48.097 32056 32457 W Ads     : The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date
05-11 17:25:48.236 32056 32056 I yoyo    : Silent sign in failed, attempting normal sign in..
05-11 17:25:48.346 32056 32447 W Ads     : Update ad debug logging enablement as false
 
Last edited by a moderator:

pipebkOT

Member
@Verilyzed
seems like the player can't log in into the google play services, instead of trying the leaderboard and achievements, focus on the login part. start simple, instead of all that "if" code just call
achievement_login()


one step at the time, are you using the 3.1.1 extension? did you put the google play app id in the game settings? did you add the email linked to your phone as user tester in the google play developer console? is your google play services on your phone up to date? it should be 16.0.91


and..........this :

IMPORTANT! If you have enabled Google cloud saving in Android Game Options without first enabling it the Google Play Game Services console, then sign in will not work due to the additional permissions being requested
 
Last edited:
V

Verilyzed

Guest
So first of all, yes i got my email into the test section of google play.
And yes I am using version 3.1.1.
I dont have enabled Google cloud saving in game maker but i had it enabled in google play console.

https://imgur.com/a/JRbtoIA (It's on german, hope it doesnt matter)

And with the Google Play Services im a little bit confused, i got version 17.1.22 if im right.
Do you mean at Settings > Android > Social > Google Services ID? Then yes.

I've deleted all the stuff with if.
Same results
Code:
05-12 11:39:15.287 28338 28389 I yoyo    : SendHighScore(leaderboard_money,215)
05-12 11:39:15.287 28338 28338 I yoyo    : Could not post score - not signed in.
05-12 11:39:15.321 28338 28389 I yoyo    : SendHighScore(leaderboard_money,200)
05-12 11:39:15.321 28338 28338 I yoyo    : Could not post score - not signed in.
One other question, can i use Firebase Cloud Messaging as normal as i could use Google Cloud Messaging (It was shut down)? So can i enter my Firebase Cloud Messaging ID at GCM ID?
 
Last edited by a moderator:

pipebkOT

Member
To use firebase. Update game maker studio to the lastest version and download the push notifications extension from the marketplace
 
Last edited:
V

Verilyzed

Guest
@pipebkOT
I've looked in the output for a while and saw this:

Code:
05-12 11:54:09.200  3912  3970 I yoyo    : AchievementLogin()
05-12 11:54:09.200  3912  3912 I yoyo    : Signing in..
05-12 11:54:09.209  3912  3970 I yoyo    : android.software.leanback = 0
05-12 11:54:09.209  3912  3970 I yoyo    : MANUFACTURER = samsung
05-12 11:54:09.568  3912  3912 I yoyo    : Silent sign in failed, attempting normal sign in..
Is it necessary?

@pipebkOT
Thanks
 
Last edited by a moderator:

pipebkOT

Member
If you have enabled cloud saving in the developer console you should enable it in game maker too



/////
https://marketplace.yoyogames.com/assets/8090/google-push-notifications

https://help.yoyogames.com/hc/en-us...-Remote-Push-Notifications-Using-Firebase-FCM

Firebase and Google cloud saving only works in gms 2.2 because 1,4 is discontinued

Also.
If you are also using the Google Play Licencing extension in your game as well as the Services extension, then you may experience issues while testing your project and trying to log into Google Play - specifically that you will be unable to log in.
https://help.yoyogames.com/hc/en-us/articles/360004274212-Android-Google-Play-Services-Logging-In
 
Last edited by a moderator:
V

Verilyzed

Guest
Yes, i am using Google Play Licencing.
So i can do nothing about it?

The path with licensing i wanted to follow but the images doesnt load
(In the tutorial you send me)
 
Last edited by a moderator:

pipebkOT

Member
@Verilyzed
The Google Play Licensing service is primarily intended for paid applications that wish to verify that the current user did in fact pay for the application on Google Play. However, any application (including free apps) may use the licensing service to initiate the download of an APK expansion

You are not obligated to use it . Especially if is going to be a free app. But if you want to use it . Go for it. Otherwise, just delete the extension


If you are gonna still use the licencing extension
You need to copy they key hash from your keystore. To do this you go to game maker preferences . Keystore. Show hash button


You copy this hash and go to the Google cloud developer console https://console.cloud.google.com/apis/credentials

And then follow the tutorial . Even if there are missing images . You could still imagine what the text is referring to
once you enter to the page


At least we know why you can't log in
 
Last edited:
V

Verilyzed

Guest
One problem: I cant delete extentions. If i delete one or only deactivate it, there comes a lot of errors in build and it fails..


So, yes now it logs me in, thanks!
But one problem is left:

Code:
05-13 19:29:50.719  8696  9134 I yoyo    : HttpResult
05-13 19:29:50.760  8696  8696 I yoyo    : Silent sign in successful
05-13 19:29:50.762  8696  8696 I yoyo    : User Verilyzed (ID: 10526**********725) logged in successfully.
05-13 19:29:50.776  8696  8798 I yoyo    : Player Logged In Correctly
05-13 19:29:50.791  8696  8696 I yoyo    : Method found, attempting to invoke onPostAchievement
05-13 19:29:50.791  8696  8696 I yoyo    : Posting achievement: achievement_a_nice_beginning
05-13 19:29:51.296  8696  8696 I yoyo    : Failed to post achievement progress for: achievement_a_nice_beginning
I also use a leaderboard:

Code:
05-13 19:41:40.319 17115 17115 I yoyo    : Method found, attempting to invoke onPostAchievement
05-13 19:41:40.319 17115 17115 I yoyo    : Posting achievement: achievement_a_nice_beginning
05-13 19:41:40.352 17115 17192 I yoyo    : SendHighScore(leaderboard_money,200)
05-13 19:41:40.352 17115 17115 I yoyo    : Posting score to leaderboard leaderboard_money: 200
05-13 19:41:40.591 17115 17115 I yoyo    : Setting vis flags to 5894
05-13 19:41:40.765 17115 17115 I yoyo    : Failed to post achievement progress for: achievement_a_nice_beginning
But the leaderboard dont makes any problems.
I dont know how long does it takes to update the leaderboard but i think this works
 
Last edited by a moderator:

Nocturne

Friendly Tyrant
Forum Staff
Admin
@Verilyzed : I have merged numerous posts of yours in this topic and would request that you follow the forum rules and use the EDIT button to add more information if noone else has posted in the meantime, instead of double and triple posting.
 

pipebkOT

Member
@Verilyzed
You need to use the achievement "ID" not the achievement name.

Don't do this
Code:
    achievement_post("achievement_a_nice_beginning", 100);
Do this:

Example:
Code:
    achievement_post("Cgklu9zP-t4BEAIQAQ", 100);
 
Last edited:
V

Verilyzed

Guest
Hi!
Thanks for the Reply.
I only got a Problem with my pc this week and my keystore file got lost or manipulated :/
I first have to contact the support to test if it works.
Idk how to get the upload_certificate.pem file….
I Need it to update my keystore file
 
V

Verilyzed

Guest
No its already released….

So i Need the upload_certificate.pem but how can i get this with game maker Studio 2 ?
 
V

Verilyzed

Guest
Thank you @pipebkOT

But now i got another Problem sorry for that xD

It is already getting on my nerves those Problems.
So, I accidentally moved my scripts Folder outside of my Project Folder. now they Arent anymore in my Project.
I moved them back and imported them in the Project but it didnt work!! It only was importing an empty script.

:( all my work gone in 10sec

EDIT: I exported that Project and imported the scripts there. It works but not for every script.
A few didnt work
 
Last edited by a moderator:

pipebkOT

Member
I hope that you could solve it, because gms2 don't have back up features:(, besides source control

next time don't move the files ;)
 
Top