Remote Config Kotlin Extensions

Getting Started

To use the Firebase Remote Config Android SDK with Kotlin Extensions, add the following to your app's build.gradle file:

// See for the latest versions
// This library transitively includes the firebase-config library
implementation '$VERSION'


Get the FirebaseRemoteConfig instance of the default app


val remoteConfig = FirebaseRemoteConfig.getInstance()

Kotlin + KTX

val remoteConfig = Firebase.remoteConfig

Get the FirebaseRemoteConfig of a given FirebaseApp


val remoteConfig = FirebaseRemoteConfig.getInstance(app)

Kotlin + KTX

val remoteConfig = Firebase.remoteConfig(app)

Get parameter values from FirebaseRemoteConfig


val isEnabled = remoteConfig.getBoolean("is_enabled")

val fileBytes = remoteConfig.getByteArray("file_bytes")

val audioVolume = remoteConfig.getDouble("audio_volume")

val maxCharacters = remoteConfig.getLong("max_characters")

val accessKey = remoteConfig.getString("access_key")

Kotlin + KTX

val isEnabled = remoteConfig["is_enabled"].asBoolean()

val fileBytes = remoteConfig["file_bytes"].asByteArray()

val audioVolume = remoteConfig["audio_volume"].asDouble()

val maxCharacters = remoteConfig["max_characters"].asLong()

val accessKey = remoteConfig["access_key"].asString()