Skip to content

Instantly share code, notes, and snippets.

@jinmanpak
Last active February 12, 2021 00:37
Show Gist options
  • Save jinmanpak/f28ee00cbea22a0e3afac15beebb49e5 to your computer and use it in GitHub Desktop.
Save jinmanpak/f28ee00cbea22a0e3afac15beebb49e5 to your computer and use it in GitHub Desktop.
Google Play login failed 처리
// Try login
public static void OnLogin()
{
/* Get login try result status. If user refused the sign-in already, not doing sign-in process */
if(GetGoogleLoginResult() == false)
{
return;
}
// Initialize login
InitializeSocialLogin();
// If you are not signed in, sign in
if (!IsSociallocalUserauthenticated())
{
Social.localUser.Authenticate((bool bSuccess, string message) =>
{
// If the trying signin is success,
if (bSuccess)
{
/* Save login success status */
}
// If the trying signin is failed,
else
{
// If user canceled google play sign-in
if(message.Equals("User Canceled"))
{
/* Save login refused status */
StatisticsData.SetGoogleLoginFailed();
}
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment