Beispiel #1
0
  /** Called when the toggle button is clicked */
  public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
    Utilities.LogDebug("GpsMainActivity.onCheckedChanged");

    if (isChecked) {
      GetPreferences();
      SetSinglePointButtonEnabled(false);
      loggingService.StartLogging();
    } else {
      SetSinglePointButtonEnabled(true);
      loggingService.StopLogging();
    }
  }
Beispiel #2
0
  /** Called when the single point button is clicked */
  public void onClick(View view) {
    Utilities.LogDebug("GpsMainActivity.onClick");

    if (!Session.isStarted()) {
      SetMainButtonEnabled(false);
      loggingService.StartLogging();
      Session.setSinglePointMode(true);
    } else if (Session.isStarted() && Session.isSinglePointMode()) {
      loggingService.StopLogging();
      SetMainButtonEnabled(true);
      Session.setSinglePointMode(false);
    }
  }