private void showNewVersionDialog(Exception e) {
    if (!isFinishing()) {

      CrashDialog.CrashDialogBuilder builder = new CrashDialogBuilder(this);
      builder.setTitle(getString(R.string.update_required_title));
      builder.setMessage(R.string.newversion_desc);
      builder.setPositiveButton(
          getString(R.string.update_button),
          new DialogInterface.OnClickListener() {

            public void onClick(DialogInterface dialog, int which) {

              Intent goToMarket = null;
              goToMarket =
                  new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.market_uri)));
              startActivity(goToMarket);

              dialog.dismiss();
            }
          });
      builder.setNegativeButton(
          getString(R.string.cancel),
          new DialogInterface.OnClickListener() {

            public void onClick(DialogInterface dialog, int which) {
              dialog.dismiss();
            }
          });

      builder.create().show();
    }
  }
  protected void showCrashDialog(final Exception e) {

    if (!isFinishing()) {

      CrashDialog.CrashDialogBuilder builder = new CrashDialogBuilder(this);
      builder.setTitle(getString(R.string.crash_dialog_title));
      builder.setMessage(R.string.crash_desc);
      builder.setPositiveButton(
          getString(R.string.send_report_button),
          new DialogInterface.OnClickListener() {

            public void onClick(DialogInterface dialog, int which) {

              if (!isFinishing()) {

                Thread thread =
                    new Thread(
                        new Runnable() {

                          @Override
                          public void run() {
                            sendAracReport(e, true);
                          }
                        });
                thread.run();
                dialog.dismiss();
              }
            }
          });
      builder.setNegativeButton(
          getString(R.string.cancel),
          new DialogInterface.OnClickListener() {

            public void onClick(DialogInterface dialog, int which) {
              dialog.dismiss();
            }
          });

      builder.create().show();
    }
  }
  protected void showAspErrorDialog(final Exception e) {

    if (!isFinishing()) {

      CrashDialog.CrashDialogBuilder builder = new CrashDialogBuilder(this);
      builder.setTitle(getString(R.string.multiple_dev_accounts_title));
      builder.setMessage(getString(R.string.multiple_dev_accounts_error));
      builder.setPositiveButton(
          getString(R.string.logout),
          new DialogInterface.OnClickListener() {

            public void onClick(DialogInterface dialog, int which) {
              dialog.dismiss();
              developerAccountManager.unselectDeveloperAccount();
              Preferences.saveSkipAutoLogin(BaseActivity.this, true);
              Intent intent = new Intent(BaseActivity.this, LoginActivity.class);
              startActivity(intent);
              overridePendingTransition(R.anim.activity_fade_in, R.anim.activity_fade_out);
            }
          });
      builder.setNegativeButton(
          getString(R.string.cancel),
          new DialogInterface.OnClickListener() {

            public void onClick(DialogInterface dialog, int which) {
              dialog.dismiss();
              developerAccountManager.unselectDeveloperAccount();
              Preferences.saveSkipAutoLogin(BaseActivity.this, true);
              Intent intent = new Intent(BaseActivity.this, LoginActivity.class);
              startActivity(intent);
              overridePendingTransition(R.anim.activity_fade_in, R.anim.activity_fade_out);
            }
          });

      builder.create().show();
    }
  }