- Home /
Sign in/out in GPG
I want to sign in and out in google play services using toggle button. At present I can able to sign in to google play services but can't able to sign out.
If I perform sign out process and then client on leaderboard view button then also I can able to view my game leaderboard.
For this process I have written following code.
void OnGPGToggleButton()
{
if (uiToggleButtons.gpgToggleButton.IsOn)
{
// authenticate user:
Social.localUser.Authenticate((bool success) =>
{
// handle success or failure
Debug.Log("Login Success : " + success);
DataStorage.StoreGPGLogin(GameConstants.PLAYERPREF_TRUE);
});
}
else
{
// sign out
PlayGamesPlatform.Instance.SignOut();
DataStorage.StoreGPGLogin(GameConstants.PLAYERPREF_FALSE);
}
}
In above code where I have done mistake that I can't able to find. Please give some suggestion in logout.
plz provide more details where is this method being called like if its in the on value change list in the ui toggle component then u need to look at the API for UIToggle. if ur calling it else where u need to specify
I am using tk2d toggle button and in working of toggle button there is no problem exist. I have check that manually also. So we have to look for other solution.
Your answer
Follow this Question
Related Questions
Google Play Permissions and Manifest files help 1 Answer
Google Play Service - LogIn Prompt not showing up 1 Answer
Google Play Services: Google Android Project or Github Plug-In? 0 Answers
Cant sign in to GPGS, Game stuck on google play game service authentication. 0 Answers
How to remove 'com.xiaomi.account.openauth.AuthorizeActivityBase.onCreate' from my game 1 Answer