コード例 #1
0
ファイル: GpsMainActivity.java プロジェクト: pari-m/gpslogger
  /** 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);
    }
  }
コード例 #2
0
ファイル: GpsMainActivity.java プロジェクト: pari-m/gpslogger
  public void OnLocationUpdate(Location loc) {
    Utilities.LogDebug("GpsMainActivity.OnLocationUpdate");
    DisplayLocationInfo(loc);
    ShowPreferencesSummary();
    SetMainButtonChecked(true);

    if (Session.isSinglePointMode()) {
      loggingService.StopLogging();
      SetMainButtonEnabled(true);
      Session.setSinglePointMode(false);
    }
  }