Ejemplo n.º 1
0
 public override void DidSignInForUser(GIDSignIn signIn, GIDGoogleUser user, NSError error)
 {
     if (error == null)
     {
         var message = string.Format("Successfully signed with {0}", user.Profile.Email);
         UIAlertController controller = UIAlertController.Create("Google SignIn", message, UIAlertControllerStyle.Alert);
         UIAlertAction     okAction   = UIAlertAction.Create("OK", UIAlertActionStyle.Default, (a) => {
             controller.DismissViewController(true, null);
         });
         controller.AddAction(okAction);
         UIApplication.SharedApplication.KeyWindow.RootViewController.PresentViewController(controller, true, null);
     }
     else
     {
         Console.WriteLine(error.LocalizedDescription);
     }
 }
Ejemplo n.º 2
0
        public override void DidSignInForUser(GIDSignIn signIn, GIDGoogleUser user, NSError error)
        {
            if (error == null)
            {
                _idToken     = user.Authentication.IdToken;
                _accountName = user.Profile.Name;

                if (_callbackDelegate != null)
                {
                    _callbackDelegate.OnConnectionSucceeded();
                }
            }
            else
            {
                if (_callbackDelegate != null)
                {
                    _callbackDelegate.OnConnectionFailed(error.Description);
                }
            }
        }
Ejemplo n.º 3
0
 public override void DidDisconnectWithUser(GIDSignIn signIn, GIDGoogleUser user, NSError error)
 {
     clearOutValues(false);
 }
Ejemplo n.º 4
0
 public override void DidDisconnectWithUser(GIDSignIn signIn, GIDGoogleUser user, NSError error)
 {
 }