Пример #1
0
        public void Initialize(Activity activity, string serverClientId, bool requestProfile, bool requestEmail)
        {
            var builder = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn);

            if (requestProfile)
            {
                builder = builder.RequestProfile();
            }
            if (requestEmail)
            {
                builder = builder.RequestEmail();
            }

            if (!string.IsNullOrEmpty(serverClientId))
            {
                builder = builder.RequestServerAuthCode(serverClientId);
            }

            googleSignInOptions = builder.Build();


            googleSignInClient = GoogleSignIn.GetClient(activity, googleSignInOptions);
            Activity           = activity;
        }