Skip to content

Commit

Permalink
Merge branch 'fix_trip_end_sync'
Browse files Browse the repository at this point in the history
  • Loading branch information
shankari committed Jan 28, 2022
2 parents 58ae59a + b323d7a commit 650965f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
id="cordova-plugin-em-datacollection"
version="1.6.0">
version="1.6.1">

<name>DataCollection</name>
<description>Background data collection FTW! This is the part that I really
Expand Down
4 changes: 4 additions & 0 deletions src/android/location/TripDiaryStateMachineService.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.LinkedList;
import java.util.List;

import edu.berkeley.eecs.emission.cordova.serversync.ServerSyncUtil;
import edu.berkeley.eecs.emission.cordova.tracker.ConfigManager;
import edu.berkeley.eecs.emission.cordova.tracker.verification.SensorControlBackgroundChecker;
import edu.berkeley.eecs.emission.cordova.tracker.ExplicitIntent;
Expand Down Expand Up @@ -345,6 +346,9 @@ public void run() {
fCtxt.getString(R.string.failed_moving_new_state, newState));
}
});

// Sync data after trip end
ServerSyncUtil.syncData(ctxt);
}
}).start();
return;
Expand Down

0 comments on commit 650965f

Please sign in to comment.