e-mission is a project to gather data about user travel patterns using phone apps, and use them to provide an personalized carbon footprint, and aggregate them to make data available to urban planners and transportation engineers.
The current version integrates with moves for the data collection. This repository tracks our attempts to move to our own data collection.
The data collection uses a geofence for duty cycling, the fused API for location, and the built-in activity recognition for segmentation.
This is currently a cordova plugin. This means that although the change is made here, in the plugin, you need to test using the e-mission-phone code, which uses the plugin.
- Check out this repo somewhere (say
~/e-mission/e-mission-data-collection
) - Follow the instructions to check out and run the e-mission-phone code. That is a separate repo, so you will check it out in a separate directory (say
~/e-mission/e-mission-phone
) - Go into the phone directory
$cd ~/e-mission/e-mission-phone
- Remove the existing plugin (
$ cordova plugin remove edu.berkeley.eecs.emission.cordova.datacollection
) - Add your copy of the plugin (
$cordova plugin add ~/e-mission/e-mission-data-collection
) - Re-run the phone code
- Every time you make a change to the plugin code, you need to remove and re-add it, and then you can test the change
While the above way is principled, it is very slow. A faster approach is to use the IDE for the appropriate platform.
- Run the e-mission-phone code once so that it generates all the project files
- Open the project in the IDE for the appropriate native platform
- Android: Open
~/e-mission/e-mission-phone/platforms/android/build.gradle
using Android Studio - iOS: Open
~/e-mission/e-mission-phone/platforms/ios/emission.xcworkspace
using XCode - make all the change to native code in the IDE and test them, and
- copy all the changes from
~/e-mission/e-mission/phone/platforms/android/src/edu/berkeley/eecs/emission/cordova/tracker
->~/e-mission/e-mission-data-collection/src/android
, and - finally check in the changes back into this repo from the
~/e-mission/e-mission-data-collection
directory.