question

Vserv avatar image
Vserv asked

Not getting Callback when pressing device back button on Login Screen

Hi , I Have integrated whispersync in my application. I noticed when i press device back key on GameCircle login screen , i didn't get any callback. is there any solution for handling 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.

1 Answer

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Gayatri, Please note there is no callback available when sign-in popup is closed. But there can be a work around. You call AmazonGamesClient.initialize() from onResume(). Then from onServiceReady() you check the users signed in status, AmazonGames amazonGames = AmazonGamesClient.getInstance(); PlayerClient playerClient = amazonGames.getPlayerClient(); if (playerClient != null && playerClient.isSignedIn()) { } else{ //User not signed in. So show the message. } Now when sign-in popup is closed, your main activities onResume would be called, you call AmazonGamesClient.initialize() from there then receive onServiceReady() callback and check the signed in status. But I agree that the message would be shown to the user whenever he/she launches the app and is not logged in. But probably there is no solution for that at this moment.
10 |5000

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