Okay, I have tried it for several hours and with several constellations, but the following things never worked:
gpgs.login() does not bring up a banner or something if the user is logged in, but I am not sure if this has to come up anyway on Android, like it does with Gamecenter on Apple.
gpgs.players.load({listener = loadLocalPlayerCallback}) does not call the listener function. I don’t know if this has to work to make the following things work:
gpgs.leaderbords.show(“xyz”) does not show the leaderboards, nor does .load trigger the listener function
gpgs.leaderboards.submit() does not submit the score
gpgs.achievements.unlock() does not unlock the achievement
… To sum that up, every gpgs-function despite init and probably login don’t seem to work here… I use 2017.3032.
local function gpgsLoginListener( event ) print( "Login event:", json.prettify(event) ) end local function gpgsListener( event ) print( "Init event:", json.prettify(event) ) if not event.isError then -- Try to automatically log in the user without displaying the login screen print("Trying to login") gpgs.login({ userInitiated = true, listener = gpgsLoginListener }) end end print("Initializing GPGS") gpgs.init( gpgsListener )
If you do not specify userInitiated = true, it will silently log you in.
and everytime I try to do something with GPGS, it prints: W/plugin.gpgs( 9729): Not connected
· · · · · · ·
Following this thread, I activated Drive API and Google Play API for the project and now it finally seems to work. I have to make a few test though, but I think that was the problem.
No Rob, It was not there before. I was testing and used a lot of things and fortunately it start working bur was not sure of how? Now with your reply, i am sure it was issue with userInitiated=true. So means we need to add this while login now. Thanks for your quick reaponse.