Ejemplo n.º 1
0
 public void SignIn()
 {
     authService.StartSignIn((authId) =>
     {
         HuaweiId = authId;
         OnSignInSuccess?.Invoke(authId);
     }, (error) =>
     {
         HuaweiId = null;
         OnSignInFailed?.Invoke(error);
     });
 }
Ejemplo n.º 2
0
 public void SignIn()
 {
     Debug.Log("[HMS]: Sign in " + authService);
     authService.StartSignIn((authId) =>
     {
         HuaweiId = authId;
         OnSignInSuccess?.Invoke(authId);
     }, (error) =>
     {
         HuaweiId = null;
         OnSignInFailed?.Invoke(error);
     });
 }
        public void SilentSignIn()
        {
            ITask <AuthAccount> taskAuthHuaweiId = authService.SilentSignIn();

            taskAuthHuaweiId.AddOnSuccessListener((result) =>
            {
                HuaweiId = result;
                OnSignInSuccess?.Invoke(result);
            }).AddOnFailureListener((exception) =>
            {
                HuaweiId = null;
                OnSignInFailed?.Invoke(exception);
            });
        }
Ejemplo n.º 4
0
 public void SignIn()
 {
     Debug.Log("[HMSAccountManager]: Sign in " + authService);
     authService.StartSignIn((authId) =>
     {
         HuaweiId = authId;
         OnSignInSuccess?.Invoke(authId);
     }, (error) =>
     {
         HuaweiId = null;
         Debug.LogError("[HMSAccountManager]: Sign in failed. CauseMessage: " + error.WrappedCauseMessage + ", ExceptionMessage: " + error.WrappedExceptionMessage);
         OnSignInFailed?.Invoke(error);
     });
 }
Ejemplo n.º 5
0
        public void SilentSignIn()
        {
            ITask <AuthAccount> taskAuthHuaweiId = authService.SilentSignIn();

            taskAuthHuaweiId.AddOnSuccessListener((result) =>
            {
                HuaweiId = result;
                OnSignInSuccess?.Invoke(result);
            }).AddOnFailureListener((exception) =>
            {
                HuaweiId = null;
                Debug.LogError("[HMSAccountManager]: Silent Sign in failed. CauseMessage: " + exception.WrappedCauseMessage + ", ExceptionMessage: " + exception.WrappedExceptionMessage);
                OnSignInFailed?.Invoke(exception);
            });
        }
Ejemplo n.º 6
0
 public void SignInAnonymously()
 {
     if (_AGConnectAuth == null)
     {
         return;
     }
     _AGConnectAuth.SignInAnonymously()
     .AddOnSuccessListener((signInResult) =>
     {
         OnSignInSuccess?.Invoke(signInResult);
     })
     .AddOnFailureListener((error) =>
     {
         OnSignInFailed?.Invoke(error);
     });
 }
Ejemplo n.º 7
0
 public void SignIn(AGConnectAuthCredential paramAGConnectAuthCredential)
 {
     if (_AGConnectAuth == null)
     {
         return;
     }
     _AGConnectAuth.SignIn(paramAGConnectAuthCredential)
     .AddOnSuccessListener((signInResult) =>
     {
         OnSignInSuccess?.Invoke(signInResult);
     })
     .AddOnFailureListener((error) =>
     {
         OnSignInFailed?.Invoke(error);
     });
 }
 public void SignInAnonymously()
 {
     if (_AGConnectAuth == null)
     {
         return;
     }
     _AGConnectAuth.SignInAnonymously()
     .AddOnSuccessListener((signInResult) =>
     {
         OnSignInSuccess?.Invoke(signInResult);
     })
     .AddOnFailureListener((error) =>
     {
         Debug.LogError("[HMSAuthServiceManager]: Sign in Anonymously failed. CauseMessage: " + error.WrappedCauseMessage + ", ExceptionMessage: " + error.WrappedExceptionMessage);
         OnSignInFailed?.Invoke(error);
     });
 }