capacitor-community / firebase-remote-config

MIT License
23 stars 38 forks source link

minimumFetchIntervalInSeconds argument in the initialize() method is not working for Android #19

Open hfunescom opened 3 years ago

hfunescom commented 3 years ago

Describe the bug When I set the minimumFetchIntervalInSeconds value on the initialize method, it's not working for Android(The value is not setted so can't fetch de new values from Firebase Remote Config platform).

Example:

FirebaseRemoteConfig.initialize({ minimumFetchIntervalInSeconds: 0, })

To Reproduce Steps to reproduce the behavior:

  1. Try setting different values in minimumFetchIntervalInSeconds and compile for Android. You will see that these values are not setted. I mean, the Firebase Remote Config Console values are not setted in the app.

Expected behavior I expect to get the new Firebase Remote Config Console values but they are not getted.

Smartphone (please complete the following information):

Possible Solution I was debugging the app, and saw that in the FirebaseRemoteConfig.java file, line 58(Method initialize), there is the next line: .setFetchTimeoutInSeconds(minFetchTimeInSecs) I replaced that line for this, and the plugin worked perfectly: .setMinimumFetchIntervalInSeconds(minFetchTimeInSecs)

It's setting the TimeOut value with the minFetchTimeInSect instead of setting the MinimumFetchIntervalInSeconds value.

Hope you can understand what I tried to explain. Please, let me know if you need me to explain anything else.

Best regards, Hernán!