Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FirebaseRemoteConfig.activateFetched(); is deprecated #61

Open
jwq199497 opened this issue Apr 13, 2019 · 4 comments
Open

FirebaseRemoteConfig.activateFetched(); is deprecated #61

jwq199497 opened this issue Apr 13, 2019 · 4 comments

Comments

@jwq199497
Copy link

the 'activateFetched()' method is deprecated; what should I use now?

@morphran
Copy link

try FIRRemoteConfig.remoteConfig().activateFetched()

@CoolMind
Copy link

See https://firebase.google.com/docs/reference/android/com/google/firebase/remoteconfig/FirebaseRemoteConfig.html#activateFetched():

public boolean activateFetched ()

This method is deprecated.
Use activate() instead.

Activates the most recently fetched configs, so that the fetched key value pairs take effect.

@LazyBonesLZ
Copy link

fetched first time, if call activate(), the value is null . What's wrong?
Here is my code:

 firebaseRemoteConfig.fetch(0L)
                .addOnCompleteListener(new OnCompleteListener<Void>() {
                    @Override
                    public void onComplete(@NonNull Task<Void> task) {
    
                        if (task.isSuccessful()) {
                         //   firebaseRemoteConfig.activateFetched();
                          firebaseRemoteConfig.activate();
                            //parse config
                            String json = firebaseRemoteConfig.getString(Constants.REMOTE_CONFING_KEY);
                   }
           }
}

@CoolMind
Copy link

CoolMind commented Sep 17, 2019

@LazyBonesLZ, I tried 0L as an interval, but ended with 3600L. If I don't mind, in case of 0L onComplete won't be called sometimes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants