void Comms_OnSessionLost() { //start login screen: if (!sessionlostdialogopen) { sessionlostdialogopen = true; Android.Support.V7.App.AlertDialog.Builder builder = new Android.Support.V7.App.AlertDialog.Builder(Plugin.CurrentActivity.CrossCurrentActivity.Current.Activity); builder.SetPositiveButton(Android.Resource.String.Ok, (o, e) => { sessionlostdialogopen = false; if (Bootlegger.BootleggerClient.CurrentUser != null) { LoginFuncs.OpenLogin(this, Bootlegger.BootleggerClient.CurrentUser?.profile["provider"].ToString()); } }); var diag = builder.Create(); diag.SetTitle(Resource.String.connectionissuetitle); diag.SetMessage(GetString(Resource.String.connectionissuebody)); diag.SetCancelable(false); diag.Show(); } }