We’ve added GPGS achievements to one of our games, and as far as I’m concerned they are working correctly.
The game goes back to the level select after each level, and this is where the achievements are triggered. On my devices this works perfectly, I see all the achievement notifications that I expect to see.
However, someone at Google Play has given us the following feedback:
Steps to repro this are very simple.
Launch game and be signed into PGS.
Play the game until one a goal for one of the achievements is reached.
Observe that no Achievement notification appears.
Log out of PGS services.
Log back into PGS services.
This does not match up with what I am seeing on our devices. If the user logs in manually then I automatically check to see if any achievements have been earned, so the fact that they get them after logging out and then back in makes some sense. What doesn’t make any sense is why they are not getting achievements before logging out and then logging back in (i.e. when automatically logged in).
Here is some of the code I am using to send the achievements:
local achievementIDs = { "randomChars1", "randomChars2", "randomChars3", "randomChars4", "randomChars5", "randomChars6", "randomChars7", "randomChars8", "randomChars9", } local function googlePlayGameCallback( event ) print("googlePlayGameCallback") print("event.type: "..event.type) end local function markAchievementComplete(id) if achievementIDs[id] then gameNetwork.request( "unlockAchievement", { achievement = { identifier=achievementIDs[id] }, listener=googlePlayGameCallback }) end end function checkAchievementsComplete() if criteria1 then markAchievementComplete(1) elseif ...... end end
Has anyone experienced anything like this before?