@Override
  protected void onResume() {
    super.onResume();

    refreshPeersFragment();

    initializeAppia();
    initializeOffercast();

    if (ConfigurationManager.instance().getBoolean(Constants.PREF_KEY_GUI_TOS_ACCEPTED)) {
      if (ConfigurationManager.instance()
          .getBoolean(Constants.PREF_KEY_GUI_INITIAL_SETTINGS_COMPLETE)) {
        mainResume();
      } else {
        controller.startWizardActivity();
      }
    } else {
      trackDialog(
          TOS.showEula(
              this,
              new OnTOSAcceptListener() {
                public void onAccept() {
                  controller.startWizardActivity();
                }
              }));
    }

    checkLastSeenVersion();
  }
  @Override
  protected void onResume() {
    super.onResume();

    refreshPlayerItem();

    if (ConfigurationManager.instance().getBoolean(Constants.PREF_KEY_GUI_TOS_ACCEPTED)) {
      if (ConfigurationManager.instance()
          .getBoolean(Constants.PREF_KEY_GUI_INITIAL_SETTINGS_COMPLETE)) {
        mainResume();
        Offers.initAdNetworks(this);
      } else {
        controller.startWizardActivity();
      }
    } else {
      TermsUseDialog dlg = new TermsUseDialog();
      dlg.show(getFragmentManager());
    }

    checkLastSeenVersion();
    registerMainBroadcastReceiver();
  }