STEPS is an Android application developed for the World Health Organization's STEPwise approach to noncommunicable disease risk factor surveillance. The application is used to register households and household members during survey rounds and then randomly select a household member to interview. Once a household member is randomly selected for interview, the survey is launched in the ODK Collect application. Supported languages are English, French, Spanish, Russian, and Arabic.
For more information, see http://www.who.int/chp/steps/en/.
Make sure the Gradle daemon (version 4.4) is installed on your build machine.
Android gradle plugin 3.1.2 with Android Studio 3.1.2 is required. Build the app by running:
gradle assembleDebug --rerun-tasks
It's good practice to sign the app before you release the app. If you don't already have a certificate for signing the APK, you can create one by running:
cd ~/.android
keytool -genkey -v -keystore release.keystore -alias androidreleasekey -keyalg RSA -keysize 2048 -validity 10000
You can show the key's SHA1 fingerprint by running:
keytool -v -list -keystore release.keystore
Add the following lines to the local.properties file in the project's root directory (you might have to create it):
store_file=/home/[username]/.android/release.keystore
store_password=your_key_store_pw
key_alias=androidreleasekey
key_password=your_release_key_pw
You can now generate a signed release APK by running:
gradle clean
gradle assembleRelease
The signed APK (build/outputs/apk/steps-app-release.apk
) should be available for distribution if the build was successful.
Use these commands to create a Docker image that can be used to run Drone-CI tests for this project:
git clone https://github.com/onaio/docker-builds.git
cd docker-builds/android
docker build -t onaio/android:steps-app --build-arg "androidComponents=platform-tools,android-21,extra-android-support,extra-android-m2repository,extra-google-m2repository" --build-arg "buildToolsVersion=27.0.3" .