The Android ohmage app
Switch branches/tags
ptsd-2.8beta-11110700 pilots-2.9.4-NIH pilots-2.9.3-NIH ohmage-2.14.6 ohmage-2.14.5 ohmage-2.14.4 ohmage-2.14.4-mobilize ohmage-2.14.3 ohmage-2.14.2 ohmage-2.14.2-mobilize ohmage-2.14.1 ohmage-2.14.1-mobilize ohmage-2.14 ohmage-2.14-mobilize ohmage-2.13.5 ohmage-2.13.4 ohmage-2.13.3 ohmage-2.13.2 ohmage-2.13.1 ohmage-2.13.0 ohmage-2.12.4 ohmage-2.12.3 ohmage-2.12.2 ohmage-2.12.1 ohmage-2.12-cuttingedge ohmage-2.11.11-NIH ohmage-2.11.10-NIH ohmage-2.11.9-NIH ohmage-2.11.8-cuttingedge ohmage-2.11.8-NIH ohmage-2.11.7-cuttingedge ohmage-2.11.7-NIH ohmage-2.11.6-cuttingedge ohmage-2.11.6-NIH ohmage-2.11.5-cuttingedge ohmage-2.11.5-NIH ohmage-2.11.4-cuttingedge ohmage-2.11.4-NIH ohmage-2.11.3-cuttingedge ohmage-2.11.3-NIH ohmage-2.11.2-cuttingedge ohmage-2.11.2-NIH ohmage-2.11.1-cuttingedge ohmage-2.11.1-NIH ohmage-2.11-cuttingedge ohmage-2.11-NIH ohmage-2.10.6-cuttingedge ohmage-2.10.6-NIH ohmage-2.10.5-cuttingedge ohmage-2.10.5-NIH ohmage-2.10.4-cuttingedge ohmage-2.10.4-NIH ohmage-2.10.3-cuttingedge ohmage-2.10.3-NIH ohmage-2.10.2-mobilize ohmage-2.10.2-cuttingedge ohmage-2.10.2-NIH ohmage-2.10.1-mobilize ohmage-2.10.1-cuttingedge ohmage-2.10.1-NIH ohmage-2.10-mobilize ohmage-2.10-cuttingedge ohmage-2.10-NIH ohmage-2.9.6-mobilize ohmage-2.9.6-cuttingedge ohmage-2.9.6-NIH ohmage-2.9.5-cuttingedge ohmage-2.9.5-NIH mobilize-2.14.8 mdev-2.9.4-multi mdev-2.9.4-NIH mdev-2.9.3-multi mdev-2.9.3-mobilize mdev-2.9.3-NIH mdev-2.9.1-multi mdev-2.9.1-NIH mdev-2.9.0-NIH mdev-2.9-NIH adev-multi-2.8.3beta adev-NIH-2.8.3beta adev-2.8beta-multi-11111500 adev-2.8beta-multi-11110400 adev-2.8beta-NIH-11111500 adev-2.8beta-NIH-11110400 AndwellnessPhone-2.2 AndWellnessPhone-2.5 AndWellnessPhone-2.1 AndWellnessPhone-2.1-tag 2.14.7
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.settings
assets
features
libs
res
src
tests
.classpath
.gitignore
.project
AndroidManifest.xml
LICENSE-2.0.html
README.md
ant.properties
build.xml
git-build.xml
proguard.cfg
project.properties

README.md

ohmagePhone

Note: This repository only contains developement up to version 2.14 and only required bug fixes are being backported. No new development will happen on this repo. Go to ohmageAndroidLib to use our new Library for Android

ohmage (http://ohmage.org) is an open-source, mobile to web platform that records, analyzes, and visualizes data from both prompted experience samples entered by the user, as well as continuous streams of data passively collected from sensors or applications onboard the mobile device.

Branches

  • master - Contains the newest changes
  • NIH - Defaults to the single campaign version and includes the newest changes and changes specific to the NIH campaign including charts and the food/stress button
  • mobilize - mobilize version of ohmage which has mobilize branding
  • ptsd - ptsd version of ohmage

Dependencies

You will need to download LogProbe and make it available to ohmage as a library apk. (Alternatively you could just change all logging functionality to use the default android logs instead of using ProbeLog)

All other external libraries which are needed are included in the libs directory of the project, but you will need the android SDK to build.

  1. Download and install the the android SDK. Instructions on downloading and installing the SDK can be found here: http://developer.android.com/sdk/installing.html. You can skip the parts related to eclipse unless you want to setup eclipse as well.
  2. Start the android configuration tool using /path/to/android-sdk/tools/android
  3. Select SDK tools and SDK Platform-tools (and the USB driver if you are running on windows).
  4. Under the Android 2.2 (API 8) section, select SDK Platform and Google APIs by Google Inc.
  5. Click Install and install the packages
  6. You are ready to start building!

Build Instructions

  1. Make sure the Android SDK dependencies are installed on your system.
  2. Download/clone the ohmagePhone repository form github.
  3. Edit any of the config information in res/values/config.xml such as the server, or campaign mode.
  4. Go to the ohmagePhone directory and run /path/to/android-sdk/tools/android update project --path .
  5. Run the project in eclipse or build the project from the command line using ant debug. Alternatively you can use ant release if you want to sign it with a release key.
  6. If compile succeeds, the .apk (application package) is in the ohmagePhone/bin directory. Copy it to the phone and open it to install. Alternatively, if the phone is plugged in you can use adb install bin/<apk_name>.apk (where <apk_name> is the name of the apk which was shown by the ant command).

Testing

We are using a combination of robotium and calabash-android (which is basically an android implementation of cucumber). Robotium tests are in the test folder and can be run as unit tests. The cucumber tests requires calabash-android to be installed. At this point this fork must be used to do the testing as it includes additional functionality not available in the main branch. Clone the fork, change into the ruby-gem directory and run rake install (you might need sudo rake install depending on how your gems are installed.) Then you can run calabash-android build to build the testing apk, and finally calabash-android run to start the tests.