Skip to content

A native Android container for Community Health Toolkit (CHT) applications

License

Notifications You must be signed in to change notification settings

medic/cht-android

Repository files navigation

Medic Mobile Android App

The medic-android application is a thin wrapper to load the CHT Core Framework web application in a webview. This allows the application to be hardcoded to a specific CHT deployment and have a partner specific logo and display name. This app also provides some deeper integration with other android apps and native phone functions that are otherwise unavailable to webapps.

Release notes

0.6.0

Upgrade notes

In order to comply with Play Store policy it was necessary to switch from using crosswalk to webview for Android 10 and above. To make this transition smoother we have implemented a migration to copy patient data and session information into the webview implementation, however please note:

  1. When loading the application after upgrade you will need an internet connection in order to cache the application code.
  2. The migration can take a few minutes to complete so after upgrade the user may be shown a login screen. If this happens, restart the application periodically until the user is logged in and the app loads as per usual.

Users on Android 9 and below will continue to use crosswalk and be unaffected by this change.

Changes

  • [improvement] medic-android#106: Update target SDK version to 29 for Play Store compliance

0.5.0

Upgrade notes

This release changes the way in which location data is collected to better align with Play Store policies. Now the information is gathered only when filling in a form as opposed to as soon as the app is loaded.

Note: This breaks backwards compatibility with older versions of the CHT Core Framework which may mean that location data is no longer collected at all. Tt is recommended you upgrade to CHT v3.9.2 or later before upgrading the android app.

Changes

  • [feature] cht-core#6380: Adds intent so opening deployment URLs will prompt to load in app
  • [improvement] medic-android#111: Compliance with Play Store developer policies for PII collection disclosure
  • [bug] cht-core#6648: Blank screen when launching external apps from CHT Android app

Development

  1. Install Android SDK
  2. Clone the repo
  3. Plug in your phone. Check it's detected with adb devices
  4. Execute: make (will also push app unto phone)

Connecting to the server locally

Refer to the cht-core Developer Guide.

Branding

Building branded apps

To build and deploy APKs for all configured brands:

make branded

Adding new brands

To add a new brand:

  1. add productFlavors { <new_brand> { ... } } in build.gradle
  2. add icons, strings etc. in src/<new_brand>
  3. to enable automated deployments, add the new_brand to .travis.yml

Releasing

Alpha for release testing

  1. Make sure all issues for this release have passed AT and been merged into master
  2. Create a git tag starting with v and ending with the alpha version, e.g. v1.2.3-alpha.1 and push the tag to GitHub.
  3. Creating this tag will trigger Travis CI to build, sign, and properly version the build. The release-ready APKs are available for side-loading from GitHub Releases and are uploaded to the Google Play Console in the "alpha" channel for only the unbranded and gamma flavors.
  4. Announce the release in #quality-assurance

Final for users

  1. Create a git tag starting with v, e.g. v1.2.3 and push the tag to GitHub.
  2. The exact same process as Step 3 above, but the demo flavour is updated also.
  3. Announce the release on the CHT forum, under the "Product - Releases" category.
  4. Each flavor is then individually released to users via "Release Management" in the Google Play Console. Once a flavor has been tested and is ready to go live, click Release to Production

Copyright

Copyright 2013-2020 Medic Mobile, Inc. [email protected]

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.