Add a Preflight Checklist
As an application administrator, I need the ability to gate the user's ability to access the application so that I can remotely turn it off should something go wrong.
Acceptance Criteria:
- GIVEN the application is starting up
- WHEN checking the backend for a preflight checklist
-
THEN it consults Firebase Remote Config
-
- WHEN checking the
platform_availableflag - AND the
platform_availableflag is true-
THEN the application moves onto the next checklist item
-
- WHEN checking the
platform_availableflag - AND the
platform_availableflag is false-
THEN the application stops -
AND it displays a dialog -
AND the title reads "App Unavailable" -
AND the dialog has a "Close App" button that closes the app when tapped -
AND the dialog cannot be dismissed by any other means
-
- WHEN checking the
minimum_versionfield - AND the given version is less than or equal to the app's
BuildConfig.VERSION_NAME-
THEN the application moves onto the next checklist item
-
- WHEN checking the
minimum_versionfield - AND the given version is greater than the app's
BuildConfig.VERSION_NAME-
THEN the application stops -
AND it displays a dialog -
AND the title reads "App Update Required" -
AND the message reads "This version of Branham Player is no longer supported and requires an update. Please update this app now." -
AND the dialog has a "Close App" button that closes the app when tapped -
AND the dialog has an "Update App" button to the right of the "Close App" button that takes the user to the Branham Player listing on the Google Play store -
AND the dialog cannot be dismissed by any other means
-
- WHEN the
messagefield is not populated-
THEN the application proceeds to the Login and Registration screen
-
- WHEN checking the
messagefield is populated - AND the
platform_availableflag is true-
THEN the message is shown in a dialog -
AND the title reads "Notice" -
AND the message contains the value of the messagefield -
AND the dialog cannot be dismissed by any other means -
AND the dialog has an "OK" button that dismisses the dialog when tapped -
AND the application proceeds to the Login and Registration screen
-
- WHEN checking the
messagefield is not populated (i.e. has a blank string) - AND the
platform_availableflag is false-
THEN the message of the above platform_availabledialog reads: "Branham Player is currently unavailable, please check back later."
-
- WHEN checking the
messagefield is populated - AND the
platform_availableflag is false-
THEN the message of the above platform_availabledialog contains the value of themessagefield
-
- WHEN checking the backend for a preflight checklist
- GIVEN the device is running the preflight checklist
- WHEN showing the screen to the user
-
THEN the screen is a direct copy of the authentication screen, except for the login and registration buttons -
AND the empty white space shows an indeterminate loading spinner in the vertical and horizontal center -
AND the spinner uses the colorAccentas its color
-
- WHEN showing the screen to the user
- GIVEN the device does not have an internet connection
- WHEN starting up
- AND checking the device's built-in list of default values
-
THEN the platform_availableflag istrue -
THEN the messagefield is blank -
THEN the minimum_versionis1.0.0
-
Developer Notes: Basically here is what happens: Platform Status -> Version Check -> Non-fatal Message
-
Platform Status Check: Whenever starting, the
platform_availableflag determines whether or not the user can get into the app. If the app is down, then display the message in themessagefield or a default message as provided by the app. -
Version Check: If we stop supporting old versions of the app, the
minimum_versionfield prevents users from below (i.e. <, not <=) a certain version from opening the app, and forcing them to update. -
Non-fatal Message: This occurs only when
platform_availableis true, but themessagefield is not empty.
As with all Firebase Remote Config installations, it falls back to a local XML file when Firebase cannot be reached. The AC for this file allows all users, regardless of the platform's status or app's VERSION_NAME, to enter.