Purple Robot is an Android application for creating automated experiences on the Android platform with sensing and inference capabilities. The app was created by the Center for Behavioral Intervention Technologies at Northwestern University as an infrastructural component for a variety of behavioral and medical intervention applications.
Building Purple Robot
Purple Robot depends upon the following packages for compilation and installation:
- Git: This may already be installed on your system.
- Android SDK: An SDK installation is included with Android Studio.
- Gradle: Install version 2.2.1.
- Java: This may already be installed.
After installing these prerequisites, open the Android SDK Manager and verify that the following packages are installed:
- Android 5.1.1 (API 22) SDK Platform
- Android SDK Build-tools 21.1.2
- Android Support Repository
- Google Repository
- Google USB Driver (or suitable ADB driver for your device)
Pull from GitHub
Once the prerequisites are installed, clone the Purple Robot Git repository at
This will check out the Purple Robot app as well as some supporting technologies. Once the repository has been fetched, initialize and update the submodules from within the
git submodule init git submodule update
Building Purple Robot from the command line
Next, go to the
Purple Robot folder and rename the following files:
gradle.properties(You may also use the existing
gradle.propertiesto sign with the testing key already contained within the repository and skip this step.)
local.properties, set the location of your Android SDK. In
gradle.properties, set the values for your Android signing keystore and key. Refer to Google's signing documentation for more details to set up your own key.
keys.xml, please obtain your own Google Places API key from the Google API Console to enable integration with Google Play location services. (You may also leave the key empty if you're not using those features.)
To test your installation, within the
Purple Robot folder, run
If that command completes successfully, you can build and install Purple Robot onto an attached Android phone by running
If you receive an error about the Java heap size, you may need to set an environmental variable instructing Gradle to use more memory:
On non-Unix platforms, you may also need to set your
JAVA_HOME environment variable to point to you local copy of the Java Development Kit.
Building Purple Robot from Android Studio
Once Purple Robot can be built from the command line, you can import the project into Android Studio and use that IDE as your primary Purple Robot development environment.
Once Android Studio is installed, select "Import Non-Android Studio Project" and browse to the
Purple Robot directory in downloaded repository.
If prompted to use a different SDK, select Android Studio's default SDK. This will update the
When prompted whether to use the Gradle wrapper, select
Cancel and select the location of your Gradle 2.2.1 installation. Android Studio will sync the Purple Robot build files.
Once Android Studio has successfully synced with the project, you should switch the build type to
release, build the app's APK, and install it on your device.
Questions or comments?
If you have any questions or comments, please send an e-mail to Chris Karr and I'll get back to you as soon as I can.