private void btnPost_Click(object sender, EventArgs e) { Android.App.AlertDialog.Builder dialog = new Android.App.AlertDialog.Builder(mainContext); Android.App.AlertDialog alert = dialog.Create(); alert.SetTitle("Confirmation"); alert.SetMessage("Are you sure you want to upload the selected file?"); alert.SetButton("OK", async(c, ev) => { var array = Helpers.VideoHelper.GetSelectedMediaData((Activity)mainContext, intentData.Data); if (tabbed != null) { await tabbed.UploadSelectedResponse(array, editDescription.Text); } else if (global != null) { await global.UploadSelectedResponse(array, editDescription.Text); } alert.Hide(); this.Dismiss(); }); alert.SetButton2("CANCEL", (c, ev) => { alert.Hide(); }); alert.Show(); }