This might be a stupid question but I havent found an answer to it on Google so its up to you :)
I am using Google Play Service to provide achievements and leaderboards in my android app. I use
unlockAchievement(getResources().getString(R.string.achievement_id));
While the achivement is unlocked correctly and is shown in the achievements list it is NOT shown to the user immediately when its unlocked, i.e. the ""achievement unlocked" thingy like in the screenshot below is not beeing displayed:
Any ideas why this doesn't pop-up?
Thanks in advance!
To unlock an achievement, call the AchievementsClient. unlock() method and pass in the achievement ID.
Try going in to your settings, go to accounts, go to your Google account and uncheck Google play games and then check it again. See if it syncs the achievements. welcome to android central! Try going in to your settings, go to accounts, go to your google account and uncheck google play games and then check it again.
Achievement-unlocked definition A goal has been accomplished.
The best way to keep track of them is to use the Google Play Games app for Android. This app is the global window to gaming on mobile. This app will let you see all of the games you have played and view the achievements for them. It will also let you find other games that have support for Google Play Games.
I got it. I used to instanciate the GameClient in my main activity and the referenced it in the game activity. So the unlock popup was bound to the main not the game activity. So I changed
MainActivity.gamesClient.unlockAchievement(...);
to
getGamesClient().unlockAchievement(...);
.
And thats it!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With