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 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); }); }
public void Init() { Debug.Log("HMS GAMES init"); authService = HMSAccountManager.Instance.GetGameAuthService(); ITask <AuthAccount> taskAuthHuaweiId = authService.SilentSignIn(); taskAuthHuaweiId.AddOnSuccessListener((result) => { InitJosApps(result); SignInSuccess?.Invoke(result); }).AddOnFailureListener((exception) => { Debug.Log("HMS GAMES: The app has not been authorized"); authService.StartSignIn((auth) => { InitJosApps(auth); SignInSuccess?.Invoke(auth); }, SignInFailure); InitGameManagers(); }); }
public void Init() { Debug.Log("HMS GAMES init"); authService = HMSAccountManager.Instance.GetGameAuthService(); ITask <AuthAccount> taskAuthHuaweiId = authService.SilentSignIn(); taskAuthHuaweiId.AddOnSuccessListener((result) => { HMSAccountManager.Instance.HuaweiId = result; Debug.Log("HMS GAMES: Setted app"); IJosAppsClient josAppsClient = JosApps.GetJosAppsClient(); Debug.Log("HMS GAMES: jossClient"); josAppsClient.Init(); Debug.Log("HMS GAMES: jossClient init"); InitGameManagers(); SignInSuccess?.Invoke(result); }).AddOnFailureListener((exception) => { Debug.Log("HMS GAMES: The app has not been authorized"); authService.StartSignIn(SignInSuccess, SignInFailure); InitGameManagers(); }); }