-1

How to keep remote config fetch time 15 minutes? is the fetch parameter value is in milliseconds or seconds? In short what number should i pass in fetch() method so that cache expires every 15 minutes.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Maximus
  • 189
  • 1
  • 3
  • 15

1 Answers1

0

try this code below,

long cacheExpiration = 900; // 15 minutes
mFirebaseRemoteConfig.fetch(cacheExpiration).addOnCompleteListener(new OnCompleteListener<Void>() {
        @Override
        public void onComplete(@NonNull Task<Void> task) {
            if (task.isSuccessful()) {
                mFirebaseRemoteConfig.activateFetched();
            }
        }
    });
Himeshgiri gosvami
  • 2,559
  • 4
  • 16
  • 28
enderkoca
  • 146
  • 9