[go: up one dir, main page]

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_available flag
    • AND the platform_available flag is true
      • THEN the application moves onto the next checklist item
    • WHEN checking the platform_available flag
    • AND the platform_available flag 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_version field
    • 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_version field
    • 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 message field is not populated
      • THEN the application proceeds to the Login and Registration screen
    • WHEN checking the message field is populated
    • AND the platform_available flag is true
      • THEN the message is shown in a dialog
      • AND the title reads "Notice"
      • AND the message contains the value of the message field
      • 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 message field is not populated (i.e. has a blank string)
    • AND the platform_available flag is false
      • THEN the message of the above platform_available dialog reads: "Branham Player is currently unavailable, please check back later."
    • WHEN checking the message field is populated
    • AND the platform_available flag is false
      • THEN the message of the above platform_available dialog contains the value of the message field
  • 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 colorAccent as its color
  • 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_available flag is true
      • THEN the message field is blank
      • THEN the minimum_version is 1.0.0

Developer Notes: Basically here is what happens: Platform Status -> Version Check -> Non-fatal Message

  • Platform Status Check: Whenever starting, the platform_available flag determines whether or not the user can get into the app. If the app is down, then display the message in the message field or a default message as provided by the app.
  • Version Check: If we stop supporting old versions of the app, the minimum_version field 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_available is true, but the message field 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.