question

mound-he avatar image
mound-he asked

Event for Local Player has been authenticated ?

Hi, I'm implementing GameCircle in Unity and I have problem to catch the moment when local player has been authenticated. Is there an event telling that ?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
There is no provision to detect the authentication event In GameCircle SDK (Android or Unity) at this moment. Sorry for the inconvenience, but we have noted your request have forwarded it to the SDK team. We may want to ask you to clarify your use case Message was edited by: Sujoy@Amazon
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mound-he avatar image
mound-he answered
Hi, To use Whispersync you need that local player is authenticated, also when you want to get scores from leaderboards for that player. To authenticate player, you need to sign in. To do that, you need to show GameCircle window. Showing GameCircle window, cause Unity to go to the background and fire an event OnApplicationPause(true). After you sign in and automaticly move back to your game, another event "OnApplicationPause(false)" is fired in Unity. The problem is that those events are the same when you quit the game and go to the background and then return. So you don't know if player returned because he went to sign in to GameCircle or he just returned to play the game. Another problem is that when you sign in from Amazon page and than automaticly move back to your game, you will not get right away local player (AGSProfile) if you do AGSProfilesClient.RequestLocalPlayerProfile(). You can receive local player after few seconds, so you are forced to request few times. Our work around for those problems is that, each time player return from background, we check max 15 times every 2 seconds if playes has been authenticated by doing AGSProfilesClient.RequestLocalPlayerProfile() and checking if it's not null.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Thank you for taking the time to send us your feedback. We will share it with the appropriate internal teams.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

shifulin avatar image
shifulin answered
I have the same issue as mound_he so I'm adding my vote for this request. The workaround he mentions should work but it's not a clean solution. With the current Game Circle Unity API, when is the proper moment to call RequestLocalPlayer ?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Shifulin, This is an old post and we did not have any public API available to detect authentication event at that time. Now that the API is released in Android SDK and it's broken in unity, we are looking into the issue. Please bare with us. Thanks. https://forums.developer.amazon.com/forums/thread.jspa?messageID=9275
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.