Setup Mobile App
Overview
This guide provides step-by-step instructions to clone and run the DIGIT Health Campaign Management (HCM) App locally on your machine. The app is a Flutter application developed for health campaigns.
Pre-requisites
Before you begin, ensure that you have the following installed on your PC:
Flutter 3.16.5 version
Flutter setup for Linux and Android - flutter documentation
Flutter setup for Windows and Android - flutter documentation
Android device
Steps
Clone the repository
Open a terminal and run the following commands:
git checkout to the branch installation-demo-setup
Configure .env file
Create a .env file inside the apps/health_campaign_field_worker_app folder.
Copy the below content to your newly created .env file.
BASE_URL={replace with base url}
MDMS_API_PATH='mdms-v2/v1/_search'
TENANT_ID="mz"`
ACTIONS_API_PATH="access/v1/actions/mdms/_get"
SYNC_DOWN_RETRY_COUNT="3"
RETRY_TIME_INTERVAL="5"
CONNECT_TIMEOUT="120000"
RECEIVE_TIMEOUT="120000"
SEND_TIMEOUT="120000"
CHECK_BANDWIDTH_API="/project/check/bandwidth"
ENV_NAME="DEMO"
Generate APK
After successfully setting up the env file, navigate to apps/health_campaign_field_worker_app folder in the terminal,
Run the following command to generate the APK:
flutter build apk --release --no-tree-shake-icons
After successfully running the above command, the APK will be generated in the path
apps/health_campaign_field_worker_app/build\app\outputs\flutter-apk\app-release.apk
Install the generated APK on your preferred Android device.
Last updated
Was this helpful?