You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using this feature to list multiple deployments to choose from, an issue occurs with deployments accessed via *.app.medicmobile.org. Upon selecting such a deployment, the app displays a red border on the login screen.
To Reproduce
Steps to reproduce the behavior:
Add a valid deployment with a URL in the format *.app.medicmobile.org to the instances list.
Build, open the app and select the deployment.
Wait for the login screen to load.
Observe the red border displayed around the login screen.
Expected Behavior
The app should not display a red border on the login screen.
There should at least be a way to suppress this behavior for a selected brand.
There is IS_TRAINING_APP flag, which produces orange borders.
Describe the Bug
When using this feature to list multiple deployments to choose from, an issue occurs with deployments accessed via
*.app.medicmobile.org
. Upon selecting such a deployment, the app displays a red border on the login screen.To Reproduce
Steps to reproduce the behavior:
*.app.medicmobile.org
to the instances list.Expected Behavior
The app should not display a red border on the login screen.
There should at least be a way to suppress this behavior for a selected brand.
There is
IS_TRAINING_APP
flag, which produces orange borders.cht-android/build.gradle
Line 426 in 1ce2a9c
Could we add a flag that suppresses any border?
IS_PRODUCTION_APP
?Screenshots
Environment
*.app.medicmobile.org
Additional context
The issue is caused by the red border logic in
EmbeddedBrowserActivity.java
:Code reference:
cht-android/src/main/java/org/medicmobile/webapp/mobile/EmbeddedBrowserActivity.java
Lines 89 to 93 in 4f2cc56
For multi-deployment brands,
settings.allowsConfiguration()
always returns true because they lack theappHost
setting.cht-android/src/main/java/org/medicmobile/webapp/mobile/SettingsStore.java
Lines 95 to 102 in 4f2cc56
Single Deployment Brands: The
app_host
property is defined:cht-android/src/musomali/res/values/strings.xml
Lines 2 to 5 in 4f2cc56
Multi-Deployment Brands: The
app_host
property is missing, causing the app to treat them as unbranded:cht-android/src/moh_kenya_echis/res/values/strings.xml
Lines 2 to 5 in 4f2cc56
Previously, we used to have either:
That is not the case now with #309. Now we can have a branded app with multiple instances.
Possible Solutions
Modify
allowsConfiguration()
inSettingsStore
to account for multi-deployment brands that lackappHost
.Introduce a dedicated setting for multi-deployment brands to ensure they are correctly branded.
Adjust the logic in EmbeddedBrowserActivity` to check branding status more reliably.
Related Issues
IS_TRAINING_APP
to true for unbranded #278The text was updated successfully, but these errors were encountered: