android6-8 Exercise 2: Remote Config flag ====================================== import com.google.firebase.Firebase import com.google.firebase.remoteconfig.remoteConfig import com.google.firebase.remoteconfig.remoteConfigSettings class FeatureFlags { private val config = Firebase.remoteConfig init { config.setConfigSettingsAsync(remoteConfigSettings { minimumFetchIntervalInSeconds = 3600 // docs: use a low interval only during development }) config.setDefaultsAsync(R.xml.remote_config_defaults) // in-app defaults, used until values are fetched (docs) } fun refresh(onDone: () -> Unit) { config.fetchAndActivate().addOnCompleteListener { onDone() } // fetch and activate in one call (docs) } val showPinnedSection: Boolean get() = config.getBoolean("show_pinned_section") } show_pinned_section false In the console create the parameter show_pinned_section (boolean), publish it, set true. In the app call refresh() on start and show or hide the pinned section from showPinnedSection. Report how soon the change appeared and what minimumFetchIntervalInSeconds did (docs: a low value is for development). Code unrun.