Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Google Play logged user information?
Started by santiagojrodriguez Oct 24 2018 09:56 AM

2 replies to this topic
googleplay

Best Answer Rob Miracle , 24 October 2018 - 10:18 AM

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

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

santiagojrodriguez

[GLOBAL: userInfoPane.html]
santiagojrodriguez
  • Observer

  • 8 posts
  • Corona SDK

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!).


[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,860 posts
  • Corona Staff

  Best Answer

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



[TOPIC: post.html]
#3

santiagojrodriguez

[GLOBAL: userInfoPane.html]
santiagojrodriguez
  • Observer

  • 8 posts
  • Corona SDK

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

Thanks for your help!




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: googleplay