示例#1
0
        private async void LogOutDialogClickListener(object sender, DialogClickEventArgs e)
        {
            if (await ServiceFunctions.RemoveDevice(this) == false)
            {
                Android.App.AlertDialog.Builder alert = new Android.App.AlertDialog.Builder(this);
                alert.SetTitle("Failed to log out.\nPlease make sure you have a working internet connection. If the problem persists, contact us.");
                alert.SetPositiveButton("OK", (IDialogInterfaceOnClickListener)null);
                RunOnUiThread(() =>
                {
                    alert.Show();
                });

                return;
            }

            MSAAuthenticator.DeleteUserUniqueId();

            OSHelper.ClearAppDataAndExit();
            FinishAffinity();
        }