Skip to content

Instantly share code, notes, and snippets.

@manoj-mili
Last active March 27, 2022 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manoj-mili/9cbed721146986157381fc28bf8119f0 to your computer and use it in GitHub Desktop.
Save manoj-mili/9cbed721146986157381fc28bf8119f0 to your computer and use it in GitHub Desktop.
/**
* common remote config data source for configs used in more than 1 module
*/
class CommonRemoteConfigData(private val config: IConfigProvider) {
fun getListOfEnabledCities(): List<String>? {
return config.dataFromJson(
config.getString(
"SOMEKEY"
)
)
}
fun isServiceEnabled(): Boolean {
return config.getBoolean("SOMEKEY")
}
// and other such implementations.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment