Google Play logged user information?

Hi guys, 

I’m starting with CoronaSDK and was able to put together a card game for Android just by following the documentation and posts here. Kudos and thanks for the detailed information and help you give to us newbies.

At this moment, I’m stuck with something and couldn’t find much information on the forum, so I’m assuming it’s either pretty stupid or impossible (heh): I’d like to get the information (username and avatar picture) of the user, assuming he’s logged on Google Play. I’d like to display a customized screen once the game finishes.

I assumed that once I got into phase using the gpgs2 plugin, I would be able to fetch the logged user information from somewhere but I can’t seem to find anything. Could you give me help? Is this the correct approach?

Thanks in advance (and sorry for my English!).

If you follow the documentation (perhaps this might make a good tutorial… hmmm) for gpgs.player.load(): https://docs.coronalabs.com/plugin/gpgs2/players/load.html

then click on the “Load” event at the bottom to see what data you get back for calling gpgs.player.load(), there is an event table that has an entry event.players that you can follow to find out what the Player object is: https://docs.coronalabs.com/plugin/gpgs2/players/type/Player/index.html and see all the things you can get back about the player.

Rob

Hi. I just got back to this last weekend. Followed your instructions and got it working.

Thanks for your help!

If you follow the documentation (perhaps this might make a good tutorial… hmmm) for gpgs.player.load(): https://docs.coronalabs.com/plugin/gpgs2/players/load.html

then click on the “Load” event at the bottom to see what data you get back for calling gpgs.player.load(), there is an event table that has an entry event.players that you can follow to find out what the Player object is: https://docs.coronalabs.com/plugin/gpgs2/players/type/Player/index.html and see all the things you can get back about the player.

Rob

Hi. I just got back to this last weekend. Followed your instructions and got it working.

Thanks for your help!