这是indexloc提供的服务,不要输入任何密码
Skip to content

Firebase remoteConfig return no value #2186

@KevynBct

Description

@KevynBct

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: 4.1.1
  • Firebase Component: firebase-config/firebase-config-ktx
  • Component version: 20.0.1

Hello everyone,

Since I've updated the component firebase-config from 20.0.0 to 20.0.1, I can't get values from Firebase.remoteConfig.

Nothing has changed in my code since previous version :

First I fetch and active in my MainActivity

val configSettings = remoteConfigSettings {
    minimumFetchIntervalInSeconds = 3600
}

Firebase.remoteConfig.setConfigSettingsAsync(configSettings)

Firebase.remoteConfig.fetchAndActivate().addOnCompleteListener(this) { task ->

    if (task.isComplete) {
        // Some code here
    }

}

And then in a fragment I get values :

with (Firebase.remoteConfig) {

    val a = getValue("key1").asString()
    val b = getValue("key2").asString()

}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions