Android companion app for InteLIS, the open-source lab information system by Deforay.
The app lets field and lab staff register Viral Load (VL), Early Infant Diagnosis (EID) and Covid-19 test requests on a phone or tablet. It stores requests in a local SQLite database, so it works without a network connection. When a connection is available, it syncs pending requests to an InteLIS server and pulls back test results. Access to the app is protected by a PIN, with optional fingerprint unlock.
Built with Ionic 9, Angular 22 and Apache Cordova.
- Prerequisites
- Install dependencies
- Run in a browser
- Build and run on Android
- Build a signed Android release
- Run tests and lint
- Project layout
- Server compatibility
- Privacy policy and terms
- Funding and partners
- License
| Tool | Version | Notes |
|---|---|---|
| Node.js | 22.23 or later | npm 10 ships with it |
| JDK | 17 | Required by Android Gradle Plugin 8.10 |
| Android SDK | Platform 36, build-tools 36.0.0 | Install through Android Studio SDK Manager |
| Gradle | 8.x on PATH |
cordova-android uses it once to create the Gradle wrapper |
Set ANDROID_HOME to the SDK root and JAVA_HOME to the JDK 17 install.
The Ionic and Cordova command line tools are project dependencies. A global install is not required.
npm installThe repository ships an .npmrc that enables legacy-peer-deps. Some Cordova wrapper packages declare outdated peer ranges, and npm refuses to install without this flag.
npm startOpen http://localhost:4200. Native plugins such as SQLite and fingerprint are unavailable in the browser, so the login and sync screens behave differently than on a device.
To build a debug APK:
npm run dbuildThe APK is written to platforms/android/app/build/outputs/apk/debug/app-debug.apk.
To build and install on a connected device or running emulator:
npm run tTo install an already built debug APK without rebuilding:
npm run rThe first Android build adds the platform under platforms/ and downloads Gradle 8.14.2 through the wrapper. Later builds reuse it.
Release builds produce an Android App Bundle (AAB) for Google Play.
-
If no keystore exists yet, create one. Store it outside version control.
npm run keygen
The command writes
my-release-key.keystorein the project root with the aliasvlsm. -
Build the release bundle.
npm run release
The bundle is written to
platforms/android/app/build/outputs/bundle/release/app-release.aab. -
Sign the bundle.
npm run bundlejarsign
-
Align the signed bundle. The output is
VLSM.aabin the project root.npm run bundlezipalign
To produce a signed APK instead, run npx cordova build android --release -- --packageType=apk after step 2, then use the appjarsign and appzipalign scripts.
Before uploading to Google Play, raise the version attribute in config.xml. Cordova derives the Android versionCode from it, and Google Play rejects a bundle whose versionCode is not higher than the previous upload.
npm test
npm run lintUnit tests run under Karma with Jasmine and require Chrome.
| Path | Contents |
|---|---|
src/app/login |
Server host, username and password entry |
src/app/app-password, src/app/enter-app-password |
PIN setup and PIN or fingerprint unlock |
src/app/vl_form, src/app/eid_form, src/app/covid-19_form |
Test request and result screens per test type |
src/app/syncTimeline |
Sync history |
src/app/services/db.service.ts |
SQLite schema and queries |
src/app/services/db-migration.service.ts |
Schema migrations between app versions |
src/app/service/syncTestRequests |
Upload of pending requests and download of results |
src/app/service/crud |
HTTP client for the InteLIS API |
config.xml |
Cordova app id, version, icons and platform preferences |
resources/ |
Source icons and splash images |
The app talks to the InteLIS server API under /api/v1.1/. At login the user enters the server host. The app then calls version.php on that host to confirm it is reachable before authenticating.
The server must allow the app's origin, and for http:// hosts the Android build enables cleartext traffic in config.xml.
The privacy policy and terms of use are published from the docs/ folder through GitHub Pages:
- Privacy policy: https://deforay.github.io/intelis-mobile/privacy.html
- Terms and conditions: https://deforay.github.io/intelis-mobile/terms.html
The privacy policy URL is the one entered in the Google Play Console listing. When the app's data handling changes, update docs/privacy.html and its effective date in the same commit.
InteLIS Mobile is developed with funding from the United States Government (USG). Over the years, the project has benefited from the support and collaboration of partners including the African Society for Laboratory Medicine (ASLM), the American Society for Microbiology (ASM), the African Field Epidemiology Network (AFENET), Emory University, and the Maryland Global Initiatives Corporation (MGIC), among others.
InteLIS Mobile is free and open-source software released under the GNU Affero General Public License v3.0 (AGPL-3.0).
Read the full text in LICENSE.md.