Download the Sermon Metadata Database
As a user, I need a local copy of the sermon metadata database so that I can have information about the current sermon without an internet connection.
Acceptance Criteria:
-
GIVEN a brand new installation of the app
- WHEN launching the app and performing the preflight checklist
- AND the metadata can be retrieved from the online data source
-
THEN Firebase Remote Config is consulted for the most recent version of the metadata -
AND a brand new copy of the sermon metadata database matching the version on Firebase is downloaded to a Room database -
AND the current metadata version number is stored in a Room database -
AND the preflight checklist continues to the next step
-
- WHEN launching the app and performing the preflight checklist
- AND the metadata can be retrieved from the online data source
-
THEN stop the preflight operations -
AND show a dialog with: -
a title of "Sermon Data Unavailable" -
a message of "Branham Player is not able to fetch the necessary data for each of the sermons. Double-check your internet connection and please try again." -
a positive button of "Retry" which restarts the preflight checklist from the beginning -
a negative button of "Close App" which closes the application
-
-
-
GIVEN the local copy of the metadata is out of date, per Firebase Remote Config
- WHEN launching the app and performing the preflight checklist
-
THEN Firebase Remote Config is consulted for the most recent version of the metadata -
AND the local copy of the old metadata is completely deleted -
AND a brand new copy of the sermon metadata database matching the version on Firebase is downloaded to a Room database -
AND the updated metadata version number is stored in a Room database -
AND the preflight checklist continues to the next step
-
- WHEN launching the app and performing the preflight checklist
- AND the metadata can be retrieved from the online data source
-
THEN stop the preflight operations -
AND show a dialog with: -
a title of "Sermon Data Unavailable" -
a message of "Branham Player is not able to fetch the necessary data for each of the sermons. Double-check your internet connection and please try again." -
a positive button of "Retry" which restarts the preflight checklist from the beginning -
a negative button of "Close App" which closes the application
-
-
- WHEN launching the app and performing the preflight checklist
Developer Notes:
- When running the preflight checklist, insert this step into whatever order makes sense.
- The URL hosting the metadata is:
https://raw.githubusercontent.com/branham-player/golden-dataset/<version number from Firebase>/condensed.json