public void SilentSign()
        {
            ITask <AuthHuaweiId> taskAuthHuaweiId = authService.SilentSignIn();

            taskAuthHuaweiId.AddOnSuccessListener((result) =>
            {
                HuaweiId = result;
                OnSignInSuccess?.Invoke(result);
            }).AddOnFailureListener((exception) =>
            {
                HuaweiId = null;
                OnSignInFailed?.Invoke(exception);
            });
        }
Example #2
0
        private void Init()
        {
            Debug.Log("HMS GAMES init");
            authService = accountManager.GetGameAuthService();

            ITask <AuthHuaweiId> taskAuthHuaweiId = authService.SilentSignIn();

            taskAuthHuaweiId.AddOnSuccessListener((result) =>
            {
                accountManager.HuaweiId = result;
                Debug.Log("HMS GAMES: Setted app");
                IJosAppsClient josAppsClient = JosApps.GetJosAppsClient(accountManager.HuaweiId);
                Debug.Log("HMS GAMES: jossClient");
                josAppsClient.Init();
                Debug.Log("HMS GAMES: jossClient init");
                InitGameMAnagers();
            }).AddOnFailureListener((exception) =>
            {
                Debug.Log("HMS GAMES: The app has not been authorized");
                authService.StartSignIn(SignInSuccess, SignInFailure);
                InitGameMAnagers();
            });
        }