コード例 #1
0
 public void stopSession() {
   tracker.stopTracking(getSession());
   locationHelper.stop();
   state.recording().stopRecording();
   notificationHelper.hideRecordingNotification();
   eventBus.post(new SessionStoppedEvent(getSession()));
 }
コード例 #2
0
 public void stopSensors() {
   if (state.recording().isRecording()) {
     return;
   }
   locationHelper.stop();
   audioReader.stop();
   state.sensors().stop();
 }
コード例 #3
0
 public void startSession(boolean locationLess) {
   setSession(new Session());
   locationHelper.start();
   startSensors();
   state.recording().startRecording();
   notificationHelper.showRecordingNotification();
   eventBus.post(new SessionStartedEvent(getSession()));
   tracker.startTracking(getSession(), locationLess);
 }
コード例 #4
0
 private Location getLocation() {
   Location location = locationHelper.getLastLocation();
   if (session.isLocationless()) {
     location = new Location("fake");
     location.setLatitude(TOTALLY_FAKE_COORDINATE);
     location.setLongitude(TOTALLY_FAKE_COORDINATE);
   }
   return location;
 }
コード例 #5
0
  public void startSensors() {
    if (!state.sensors().started()) {
      locationHelper.start();

      audioReader.start();
      externalSensors.start();
      state.sensors().start();
    }
  }
コード例 #6
0
 private void cleanup() {
   locationHelper.stop();
   state.recording().stopRecording();
   setSession(new Session());
   notificationHelper.hideRecordingNotification();
 }
コード例 #7
0
  public Note makeANote(Date date, String text, String picturePath) {
    Note note = new Note(date, text, locationHelper.getLastLocation(), picturePath);

    tracker.addNote(note);
    return note;
  }