Skip to content

Firebase Remote Config doesn't work with live versions on Google Play #2287

@mwaked

Description

@mwaked

I integrated Firebase remote config and it's working fine when i run debug, release or APK from bundle any build from Android studio work fine and return remote config data also when i install the app which uploaded to Huawei or Samsung Store it is working fine also, Only the app from Google Play doesn't return any remote config data so something is very strange!!

Any one faced the same problem before?

Maybe the problem in the bundle which uploaded to Google Play?

Gradle:

implementation 'com.google.firebase:firebase-config-ktx:20.0.2'

BaseApplication:

 override fun onCreate() {
        super.onCreate()
        initRemoteConfig()
 }

  private fun initRemoteConfig() {
    val mFirebaseRemoteConfig = FirebaseRemoteConfig.getInstance()

    mFirebaseRemoteConfig.setConfigSettingsAsync(
            FirebaseRemoteConfigSettings.Builder().setMinimumFetchIntervalInSeconds(3600L)
                    .build()
    )
    mFirebaseRemoteConfig.setDefaultsAsync(R.xml.remote_config_defaults)
    var cacheExpiration: Long = 720
    if (BuildConfig.DEBUG) {
        cacheExpiration = 0
    }
    mFirebaseRemoteConfig.fetch(cacheExpiration)
            .addOnCompleteListener { task: Task<Void?> ->
                if (!task.isSuccessful) return@addOnCompleteListener
                mFirebaseRemoteConfig.activate()
                // Get remote config data
            }

}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions