protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            base.OnActivityResult(requestCode, resultCode, data);
            string test = data.GetStringExtra("com.microsoft.identity.client.finalUrl");

            AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(requestCode, resultCode, data);
        }
Exemple #2
0
 protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
 {
     base.OnActivityResult(requestCode, resultCode, data);
     // this sets the authentication response on Android from the webview
     //or broker in order to continue with token aquisition
     AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(requestCode, resultCode, data);
 }
 /// <summary>
 /// Required override method for ADAL integration
 /// </summary>
 protected override void OnMAMActivityResult(
     int requestCode,
     Result resultCode,
     Intent data)
 {
     base.OnMAMActivityResult(requestCode, resultCode, data);
     AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(requestCode, resultCode, data);
 }
        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            base.OnActivityResult(requestCode, resultCode, data);

            if (requestCode == FilePickerService.RequestCode)
            {
                FilePickerAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(
                    ContentResolver, requestCode, resultCode, data);
                return;
            }
            AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(
                requestCode, resultCode, data);
        }
 protected override void OnActivityResult(int requestCode, Result resultCode,
                                          Intent data)
 {
     base.OnActivityResult(requestCode, resultCode, data);
     if (requestCode == 1)
     {
         var bitmap = data.Extras.Get("data") as Bitmap;
         TaskCompletionSource.SetResult(bitmap);
     }
     else
     {
         AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(
             requestCode, resultCode, data);
     }
 }
Exemple #6
0
        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            base.OnActivityResult(requestCode, resultCode, data);
            AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(requestCode, resultCode, data);
            //Uri uri = new Uri(data.GetStringExtra("ReturnedUrl"));

            //Console.WriteLine("Here");
            //Console.WriteLine(uri.PathAndQuery);
            //var auth = DependencyService.Get<IAuthenticator>();
            //var code1 = uri.PathAndQuery.ParseQueryString()["code"];
            //var code = WebUtility.UrlDecode(uri.PathAndQuery).ParseQueryString()["code"];

            //Console.WriteLine(code1);
            //Console.WriteLine(code);
            //Console.WriteLine(code1);
            //Console.WriteLine(code);
            //auth.RiseAuthenication(code);
        }
Exemple #7
0
        protected override void OnActivityResult(int requestCode, Android.App.Result resultCode, Intent data)
        {
            try
            {
                base.OnActivityResult(requestCode, resultCode, data);

                if (resultCode == Result.Ok)
                {
                    AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(requestCode, resultCode, data);
                    //DialogHelper.ShowProgressDialog(this, false, "Logging you in..");
                }
                else
                {
                    // DialogHelper.ShowProgressDialog(this, true, "Logging you in..");
                    return;
                }
            }
            catch (Exception ex)
            {
            }
        }
Exemple #8
0
        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            base.OnActivityResult(requestCode, resultCode, data);

            if (App.authResult == null)
            {
                AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(requestCode, resultCode, data);
                Toast.MakeText(this, "Authentication Succesful", ToastLength.Long).Show();
            }


            // Make it available in the gallery
            Intent mediaScanIntent = new Intent(Intent.ActionMediaScannerScanFile);

            if (App._file != null)
            {
                Uri contentUri = Uri.FromFile(App._file);
                mediaScanIntent.SetData(contentUri);
                SendBroadcast(mediaScanIntent);

                // Display in ImageView. We will resize the bitmap to fit the display
                // Loading the full sized image will consume to much memory
                // and cause the application to crash.

                int height = Resources.DisplayMetrics.HeightPixels;
                int width  = _imageView.Height;
                App.bitmap = App._file.Path.LoadAndResizeBitmap(width, height);
                if (App.bitmap != null)
                {
                    _imageView.SetImageBitmap(App.bitmap);
                    App.bitmap = null;
                }

                // Dispose of the Java side bitmap.
                GC.Collect();
            }
        }
 /// <summary>
 /// Required override method for ADAL integration
 /// </summary>
 public override void OnMAMActivityResult(int requestCode, [GeneratedEnum] Result resultCode, Intent data)
 {
     base.OnMAMActivityResult(requestCode, resultCode, data);
     AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(requestCode, resultCode, data);
 }
 /// <summary>
 /// Вызывается, когда активность, которая запущена завершает работу, предоставляя
 /// нам код запроса с которого она запустилась
 /// </summary>
 /// <param name="requestCode"></param>
 /// <param name="resultCode"></param>
 /// <param name="data"></param>
 protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
 {
     base.OnActivityResult(requestCode, resultCode, data);
     // Для Identity.Client по правилам завершения работы
     AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(requestCode, resultCode, data);
 }
Exemple #11
0
 protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
 {
     base.OnActivityResult(requestCode, resultCode, data);
     AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(requestCode, resultCode, data);;
     (theApp.MainPage as HybridWebViewPage).InvokeEvent("resume");
 }
Exemple #12
0
 public void ContinueAcquireToken(int requestCode, Result resultCode, Intent data)
 {
     AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(requestCode, resultCode, data);
 }
 public static void OnActivityResult(this IAdal adal, int requestCode, Result resultCode, Intent data)
 {
     AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(requestCode, resultCode, data);
 }