android - Firebase remote config cache expiration time in release -
i'm trying setup firebase remote config release mode setting developer mode false
. cache expiration time less 3000(may bit less, determined experimentally) seconds, fails fetch data. throws firebaseremoteconfigfetchthrottledexception
firebaseremoteconfigsettings configsettings = new firebaseremoteconfigsettings.builder() .setdevelopermodeenabled(false) .build();
and .setdevelopermodeenabled(true)
allows me set time 0 , works well.
here whole hunk:
new handler().postdelayed(new runnable() { @override public void run() { mfirebaseremoteconfig = firebaseremoteconfig.getinstance(); firebaseremoteconfigsettings configsettings = new firebaseremoteconfigsettings.builder() .setdevelopermodeenabled(false) .build(); mfirebaseremoteconfig.setconfigsettings(configsettings); mfirebaseremoteconfig.setdefaults(r.xml.remote_config_defaults); mfirebaseremoteconfig.fetch(cache_expiration) .addonsuccesslistener(new onsuccesslistener<void>() { @override public void onsuccess(void avoid) { log.i("info32", "remote config succeeded"); mfirebaseremoteconfig.activatefetched(); } }) .addonfailurelistener(new onfailurelistener() { @override public void onfailure(@nonnull exception exception) { log.i("info32", "remote config failed"); } }); } }, 0);
could please explain issue is?
remote config implements client-side throttling prevent buggy or malicious clients blasting firebase servers high frequency fetch requests. 1 user has reported limit 5 requests per hour. haven't found limit documented anywhere, although have confirmed 5 rapid fetches activate throttling.
the caching of configuration values explained in the documentation. because of throttling limits, not possible released app see changes in remote config values. cached values used until next fetch allowed. default cache expiration 12 hours.
Comments
Post a Comment