我正在尝试通过将开发人员模式设置为false
. 但是缓存过期时间少于 3000 秒(可能会少一点,实验确定),它无法获取数据。它抛出FirebaseRemoteConfigFetchThrottledException
FirebaseRemoteConfigSettings configSettings = new FirebaseRemoteConfigSettings.Builder()
.setDeveloperModeEnabled(false)
.build();
有了.setDeveloperModeEnabled(true)
它,我可以随时设置甚至 0 并且效果很好。
这是整个大块:
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);
你能解释一下是什么问题吗?