I am new in using Firebase Remote Config, so I am trying to figure out how it works. from the documentation here https://firebase.google.com/docs/remote-config/use-config-android#policies_and_limits. it is said:
The default minimum fetch interval for Remote Config is 12 hours, which means that configs won't be fetched from the backend more than once in a 12 hour window, regardless of how many fetch calls are actually made
but I am confused why right after I change the parameter value and publish it via firebase console, then it will always give immediate effect on the client side. currently I am using Android. and here is the code on my Android App:
first, I set up the default value:
private var remoteConfig = FirebaseRemoteConfig.getInstance()
// set remote config default value
val default : HashMap<String,Any> = hashMapOf(
REMOTE_CONFIG_ALLOWABLE_APP_VERSIONS to "[${BuildConfig.VERSION_NAME}]",
REMORE_CONFIG_NUMBER_OF_DOCUMENTS_PER_PAGE to 15
)
remoteConfig.setDefaultsAsync(default)
and then I fetch and activate data using this:
remoteConfig.fetchAndActivate().addOnSuccessListener {
checkAppVersion()
}.addOnFailureListener {
mActivity.toast("Failed to get configuration data")
}
I don't set FirebaseRemoteConfigSettings.Builder.setMinimumFetchIntervalInSeconds(long)
in my code above, so I assume the minimum fetch interval is determined by the default value of 12 hours.
so after changing the parameter value from firebase console and publish it, I assume this line will not be triggered.
remoteConfig.fetchAndActivate().addOnSuccessListener {
// the code inside here will not be triggered ?
// I assume the code in here will not be triggered if last time fetch is not more than 12 hours
}
is this a correct behaviour ? or do I make something wrong ? actually I am happy if it can give immediate effect on the client side, but if I read the documentation, there is a throttling issue. so I am worried I will get exception because of throttling, because it seems I fetch data over and over again
previously, indeed I use this setting configuration:
remoteConfig = FirebaseRemoteConfig.getInstance()
val configSettings = FirebaseRemoteConfigSettings.Builder()
.setMinimumFetchIntervalInSeconds(0)
.build()
remoteConfig.setConfigSettingsAsync(configSettings)
but after I am satisfied with developing mode, then I remove that config settings. and I hope I will refetch data from 12 hours default value
is this give an effect ? cached or something ?
CASE CLOSED: after uninstalling the app, then my app behaves like I expect. maybe .setMinimumFetchIntervalInSeconds(0) is also cached. even though I have removed it, it still behaves like that.