google play services on android

We have noticed that our app seems to have stopped tracking leaderboard data with our latest release and attempts to show the leaderboard don’t work.  We had been using the legacy play services plugin and thinking that was the cause have upgraded all of our code to the new plugin however it still doesn’t seem to work.  I’ve double checked all build.settings and config.lua settings.  Calling gpgs.init() hits the callback function correctly indicating init is complete but the app is not logged into gpgs and calling login() doesn’t seem to do anything.  Is anyone else having problems with gpgs?

Hey man, im sorry I cant help you with your problem but I have a problem.

i’m new to corona, built my first game successfully. But now I have an issue with implementing Google Play Game Services(GPGS) in my game.

Can you help me with it? as im a new bee.

I successfully did the licensing part in the app, and the app is verified.

I tried to implement the GPGS service, but the Starting GPGS connected thing or anything wont show.

Here’s my code for calling the GPGS service, it would be of great help if you’d help me set up GPGS for my first game.

[lua]

local gpgs = require( “plugin.gpgs” )

local function gpgsLoginListener( event )

  

  gpgsData.userPref = event.phase

  

end

local function gpgsInitListener( event )

    if not event.isError then

        – Try to automatically log in the user with displaying the login screen

           

        if (gpgsData.userPref == “logged in”) then                

          gpgs.login( { listener = gpgsLoginListener } )    

                        

      elseif (gpgsData.userPref == “logged out”) then            

       – DO NOTHING            

      end        

     

  end 

end 

gpgs.init( gpgsInitListener )   

gpgs.setPopupPosition( “TopCenter” )

gpgs.isConnected()[/lua]

Where do you declare gpgsData?  

What provides the values “logged in” and “logged out”? Normally you won’t get those until after you have successfully logged in, but you’re trying to use those values to determine if you should try and login or not.

Finally gpgs.isConnected() returns a true of false value if you’re connected. You never store the value of that call nor do you test it anywhere. The gpgs.init() call is also asynchronous which means the next lines of code executes before the gpgs.init() finishes. So even if you were properly capturing or testing the value of gpgs.isConnected() it’s going to execute before gpgs.init() is finished.

Here is my login workflow:

local json = require("json") local function gpgsLoginListener( event ) print( "Login event:", json.prettify(event) ) --do stuff after logged in 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 )

Hey man, im sorry I cant help you with your problem but I have a problem.

i’m new to corona, built my first game successfully. But now I have an issue with implementing Google Play Game Services(GPGS) in my game.

Can you help me with it? as im a new bee.

I successfully did the licensing part in the app, and the app is verified.

I tried to implement the GPGS service, but the Starting GPGS connected thing or anything wont show.

Here’s my code for calling the GPGS service, it would be of great help if you’d help me set up GPGS for my first game.

[lua]

local gpgs = require( “plugin.gpgs” )

local function gpgsLoginListener( event )

  

  gpgsData.userPref = event.phase

  

end

local function gpgsInitListener( event )

    if not event.isError then

        – Try to automatically log in the user with displaying the login screen

           

        if (gpgsData.userPref == “logged in”) then                

          gpgs.login( { listener = gpgsLoginListener } )    

                        

      elseif (gpgsData.userPref == “logged out”) then            

       – DO NOTHING            

      end        

     

  end 

end 

gpgs.init( gpgsInitListener )   

gpgs.setPopupPosition( “TopCenter” )

gpgs.isConnected()[/lua]

Where do you declare gpgsData?  

What provides the values “logged in” and “logged out”? Normally you won’t get those until after you have successfully logged in, but you’re trying to use those values to determine if you should try and login or not.

Finally gpgs.isConnected() returns a true of false value if you’re connected. You never store the value of that call nor do you test it anywhere. The gpgs.init() call is also asynchronous which means the next lines of code executes before the gpgs.init() finishes. So even if you were properly capturing or testing the value of gpgs.isConnected() it’s going to execute before gpgs.init() is finished.

Here is my login workflow:

local json = require("json") local function gpgsLoginListener( event ) print( "Login event:", json.prettify(event) ) --do stuff after logged in 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 )