/
OpenSRP android client app build
OpenSRP android client app build
Note: OpenSRP App build depends on Server build, so please complete that before building app
- Clone OpenSRP app git repository from https://github.com/OpenSRP/opensrp-client using
git clone https://github.com/OpenSRP/opensrp-client
- Android Emulator
- Default Emulator: Create, for the first time, and start an Android Virtual Device by using
android avd
with API level 16 and screen resolution 1024 X 600 - Genymotion: Alternatively, you can also install Genymotion Android Emulator which is much faster than the default Android emulator.
- Install Genymotion emulator
- Install Virtual Box
- Follow ARM Translation instructions to get OpenSRP app working on Genymotion
- Start Genymotion emulator and create a Virtual device with API level 16 and screen resolution 1024 X 600
- Default Emulator: Create, for the first time, and start an Android Virtual Device by using
- Install gradle, you can obtain it from the Gradle home page (http://gradle.org/).
Login (for demo server):
login-username - demotest, login-password - Demot123
Check app.properties file in "drishti-app/asset/" folder to change the demo server url to your own instance of opensrp server.
Building and Running from terminal :
source : http://developer.android.com/tools/building/building-cmdline.html
- Build App
- Debug Mode
- Windows : gradlew.bat assembleDebug
- Mac Os and Linux : ./gradlew assembleDebug
- Release Mode
- Windows : gradlew.bat assembleRelease
Mac Os and Linux : ./gradlew assembleRelease
- Debug Mode
Running the App
- Apk file can be found in opensrp-app/build/outputs/apk
- Install the apk to emulator/device.
- Unit Test
- Debug Mode : gradlew testArmDebug
test report : opensrp-app/build/reports/tests/armDebug/index.html - Release Mode : gradlew testArmRelease
test report : opensrp-app/build/reports/tests/armRelease/index.html - All Mode : gradlew test
- Debug Mode : gradlew testArmDebug
- Integration Test
- Debug Mode : gradlew connectedAndroidTestArmDebug
test report : opensrp-app/build/reports/androidTests/connected/flavors/arm/index.html
- Debug Mode : gradlew connectedAndroidTestArmDebug
Building and Running from Android Studio :
source : http://developer.android.com/tools/building/building-studio.html
- Build App
To build the project on Android Studio, click Build and select Make Project. - Running the App
- Create run configuration
- Click "Run -> Edit Configurations"
- Select "+" from the upper left corner and select Android Application
- Add a name for the configuration
- Set module to opensrp-app
- Run the configuration
- Create run configuration
- Unit Test
- Open the "Build variants" tool window (on the left) and change the test artifact to "Unit tests".
- Create test configuration
- Click "Run -> Edit Configurations"
- Select "+" from the upper left corner and select Junit
- Add a name for the test
- Set "Test kind" to "All in package" if you want to test all the files in the package. Set module to opensrp-app.
- Important : Replace working directory value to "$MODULE_DIR$"
- Run the test configuration
- Integration Test
- Open the "Build variants" tool window (on the left) and change the test artifact to "Android Instrumentation Tests".
- Create test configuration
- Click "Run -> Edit Configurations"
- Select "+" from the upper left corner and select "Android Tests"
- Add a name for the test
- Set module to opensrp-app
- Run the test configuration
, multiple selections available,
Related content
Tools and Frameworks Setup
Tools and Frameworks Setup
Read with this
Setting up Keycloak
Setting up Keycloak
More like this
OpenSRP Server Build
OpenSRP Server Build
Read with this
Identity Management With Keycloak
Identity Management With Keycloak
More like this
System Architecture
System Architecture
Read with this
Getting started with OpenSRP
Getting started with OpenSRP
Read with this