Last active
March 27, 2022 10:02
-
-
Save manoj-mili/9cbed721146986157381fc28bf8119f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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