Logged in User (Google Play)

Hi all

I’ve searched for many days with no success, can anyone tell me how to get an account email/id of logged in Google play user. I want to save all my customers in game currency. Currently I’m using SQLite, if they uninstall they lose all earned gold. Since they are already logged into Google, I don’t want to make the customers log into another system.

Thanks,

Karl

I haven’t looked at my code related to GPGS, but if I remember correctly, the playerID is unique:

http://docs.coronalabs.com/daily/api/library/gameNetwork/request.html

That would be  event.data.playerID  returned in requestCallback listener when requesting “loadLocalPlayer”:

gameNetwork.request( “loadLocalPlayer”, { listener=requestCallback } )

Naomi

This was exactly what I needed, for someone reason I thought loadLocalPlayer was part of the multiplayer API’s. sorry for not responding sooner I got caught up in trying to figure out exactly how I wanted to use it.

Thanks,

Karl

Glad it worked out for you.

Naomi

I haven’t looked at my code related to GPGS, but if I remember correctly, the playerID is unique:

http://docs.coronalabs.com/daily/api/library/gameNetwork/request.html

That would be  event.data.playerID  returned in requestCallback listener when requesting “loadLocalPlayer”:

gameNetwork.request( “loadLocalPlayer”, { listener=requestCallback } )

Naomi

This was exactly what I needed, for someone reason I thought loadLocalPlayer was part of the multiplayer API’s. sorry for not responding sooner I got caught up in trying to figure out exactly how I wanted to use it.

Thanks,

Karl

Glad it worked out for you.

Naomi