APIs & services / Firebase

Read the show_force_sync flag (show_analytics_tab and current_season_value are fetched but unused).

Endpointtoday's app
Call
SDK Firebase Remote Config
Service
Firebase
Features
App startup and role detection, Settings
When
App start
Auth
Firebase app credentials
In the App Service

Use case

HomeActivity.onCreate calls FirebaseConfig.fetchAndActivate. The minimum fetch interval is 12 hours in release and 0 in debug, with defaults from res/xml/remote_config_defaults.xml. Only show_force_sync is read today: SettingsActivity shows the Force Sync option when it is true. The read of show_analytics_tab in BottomNavigationDrawerFragment is commented out, and getCurrentSeasonValue() (current_season_value) has no callers. If the fetch fails, the defaults or last activated values apply.

Headers

HeaderValueNotes
(Firebase SDK)<Firebase app credentials>No user auth.

Request

No body.

Response

Example response body (synthetic data)
{
  "show_force_sync": true,
  "show_analytics_tab": false,
  "current_season_value": "RABI_2023_2024"
}
FieldTypeRequiredNotes
show_force_syncbooleanDefault true. Controls the Force Sync row in Settings.
show_analytics_tabbooleanDefault false. Not read (code commented out).
current_season_valuestringDefault RABI_2023_2024. Not read by the app.

Errors

StatusWhenWhat the app does
SDK failureFetch fails or throttledLogged. Defaults or the last activated values are used.

Source

  • app/src/main/java/org/platformcommons/urvi/fcm/FirebaseConfig.kt
  • app/src/main/res/xml/remote_config_defaults.xml
  • app/src/main/java/org/platformcommons/urvi/view/home/HomeActivity.kt
  • app/src/main/java/org/platformcommons/urvi/view/home/SettingsActivity.kt
  • app/src/main/java/org/platformcommons/urvi/view/home/BottomNavigationDrawerFragment.kt