protected override void OnCreate (Bundle savedInstanceState) { base.OnCreate (savedInstanceState); SetContentView (Resource.Layout.MainLayout); // Create the picker instance picker = Picker.CreatePicker (OneDriveAppId); // Add the start picker listener FindViewById<Button> (Resource.Id.startPickerButton).Click += delegate { // Clear out any previous results ClearResultTable (); // Determine the link type that was selected LinkType linkType; if (FindViewById<RadioButton> (Resource.Id.radioWebViewLink).Checked) { linkType = LinkType.WebViewLink; } else if (FindViewById<RadioButton> (Resource.Id.radioDownloadLink).Checked) { linkType = LinkType.DownloadLink; } else { throw new Exception ("Invalid Radio Button Choosen."); } // Start the picker picker.StartPicking (this, linkType); }; // Add the save as listener for download links FindViewById<Button> (Resource.Id.saveAsButton).Click += delegate { if (downloadUrl != null) { var downloadManager = DownloadManager.FromContext (this); var request = new DownloadManager.Request (downloadUrl); request.SetNotificationVisibility (DownloadVisibility.VisibleNotifyCompleted); downloadManager.Enqueue (request); } }; }