コード例 #1
0
        public void StartAuthentication(string clientId, string scope, string appSecret, Uri authorizeUrl, Uri redirectUrl, Uri tokenUrl, bool codeChallengeMethod)
        {
            Xamarin.Auth.OAuth2Authenticator oAuth2 = new Xamarin.Auth.OAuth2Authenticator(clientId,
                                                                                           appSecret,
                                                                                           scope,
                                                                                           authorizeUrl,
                                                                                           redirectUrl,
                                                                                           tokenUrl);
            oAuth2.Completed += OnOAuth2Completed;
            oAuth2.Error     += OnOAuth2Error;

            Android.Content.Context context = Android.App.Application.Context;
            Android.Content.Intent  loginUI = oAuth2.GetUI(context);
            loginUI.AddFlags(Android.Content.ActivityFlags.NewTask);
            context.StartActivity(loginUI);
        }
コード例 #2
0
        public static void OpenUserProfile(UserAccount Account, Android.Content.Context context)
        {
            ProfileActivity.SetProfileAccount(Account);

            context.StartActivity(new Android.Content.Intent(context, typeof(ProfileActivity)));
        }