Navigation Menu

Skip to content

Commit

Permalink
Document training app feature for android flavors (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
abbyad committed Apr 12, 2022
1 parent be8fc21 commit e43dad3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions content/en/apps/examples/training.md
Expand Up @@ -8,6 +8,7 @@ keywords: training onboarding
relatedContent: >
apps/reference/app-settings/token_login/
apps/concepts/access/
apps/guides/onboarding/
---

The CHT’s Remote Onboarding and Training functionality enables Supervisors and Administrators to train CHWs on care workflows and related app use without being physically present. It is designed for:
Expand Down
15 changes: 8 additions & 7 deletions content/en/apps/guides/onboarding/_index.md
Expand Up @@ -4,6 +4,9 @@ linkTitle: "Onboarding"
weight: 15
description: >
Best practices when using a Training App to keep training and production data apart
relatedContent: >
core/guides/android/branding/
apps/examples/training/
---

Expand All @@ -14,14 +17,12 @@ When onboarding new users, having a dedicated CHT app and instance for training
## Setting up a training app

A separate Android App can be created for training, which would point to a CHT instance dedicated to training. The training instance should have the same configuration as the production instance, and have users created for training. To differentiate the Android app used for training from the production one, create a duplicate of [your flavor]({{< relref "core/guides/android/branding" >}}) and modify the following aspects
- **App ID**: If you want to allow both apps to be on a device at once you will need to make sure your training app has a different `applicationId`. If you want to prevent having both the training and production apps installed at the same time keep these values the same.
- **CHT Instance**: Set the `app_host` string to be the URL of your training instance, otherwise it will in effect be the same as using the production app.
- {{< figure src="training-app.png" link="training-app.png" alt="CHT training app with border and message" class="right col-6 col-lg-4" >}}**Border & Message**: Consider adding a distinctive border and message when using the training app. This can be done by setting the build config field `IS_TRAINING_APP` to `true`, as seen in [`build.gradle`](https://github.com/medic/cht-android/blob/8d077ed08dc3889ef1f4e3bad7231931bca55d87/build.gradle#L212-L216) for the training version of the Gamma app.
- **CHT Instance**: In your flavor's `res/values/strings.xml` file set the `app_host` string to be the URL of your training instance, as seen in the [Gamma Training app](https://github.com/medic/cht-android/blob/8d077ed08dc3889ef1f4e3bad7231931bca55d87/src/medicmobilegamma_training/res/values/strings.xml#L3). If left the same as the production app both training and production data will end up in your production instance.
- **Launcher icons**: Consider using completely different icons, or at least change the color of the launcher icons.
- **App name**: Provide a noticeably different name to the training app. Since app names are often cut short on Android devices, make the change at beginning of the text. For example, `[TRAINING] CHW App` would be better than `CHW App [TRAINING VERSION]`, since the latter may only display as `CHW App...`.
- **Border & Message**: Consider adding a distinctive border and message when using the training app. This might be done in a more automated way in future versions of CHT Android, and in the meantime can be [modeled after this example](https://github.com/medic/cht-android/commit/8d077ed08dc3889ef1f4e3bad7231931bca55d87).

![CHT with border](border.png)

- **App name**: Provide a noticeably different name to the training app. Since app names are often cut short on Android devices, make the change at beginning of the text. For example, `CHW App [TRAINING VERSION]` may display as `CHW App...` so it would be better to use `[TRAINING] CHW App`. The app name is set in the flavor's `res/values/strings.xml` file, as seen in [the Gamma training app](https://github.com/medic/cht-android/blob/8d077ed08dc3889ef1f4e3bad7231931bca55d87/src/medicmobilegamma_training/res/values/strings.xml#L4).
- **App ID**: If you want to allow both apps to be on a device at once you will need to make sure your training app has a different `applicationId`, as seen [in `build.gradle` for the Gamma training app](https://github.com/medic/cht-android/blob/8d077ed08dc3889ef1f4e3bad7231931bca55d87/build.gradle#L214).
{{% alert title="Note" %}}Keeping the `applicationId` values the same will make it impossible to have both the training and production apps installed at the same time on a device. If you have a way to install the production app after the training is complete then you may choose to do this to prevent users from using the wrong app.{{% /alert %}}

## Switching from training to production app

Expand Down
Binary file removed content/en/apps/guides/onboarding/border.png
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e43dad3

Please sign in to comment.