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.
- 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
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.
- 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.
- Start the android configuration tool using
- Select SDK tools and SDK Platform-tools (and the USB driver if you are running on windows).
- Under the Android 2.2 (API 8) section, select SDK Platform and Google APIs by Google Inc.
- Click Install and install the packages
- You are ready to start building!
- Make sure the Android SDK dependencies are installed on your system.
- Download/clone the ohmagePhone repository form github.
- Edit any of the config information in
res/values/config.xmlsuch as the server, or campaign mode.
- Go to the ohmagePhone directory and run
/path/to/android-sdk/tools/android update project --path .
- Run the project in eclipse or build the project from the command line using
ant debug. Alternatively you can use
ant releaseif you want to sign it with a release key.
- 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
adb install bin/<apk_name>.apk(where
<apk_name>is the name of the apk which was shown by the ant command).
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
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.