File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -21,19 +21,21 @@ argument containing the additional configuration options for
2121the [ ConfigCat Kotlin SDK] ( https://github.com/configcat/kotlin-sdk ) :
2222
2323``` kotlin
24- // Configure the provider.
25- val provider = ConfigCatProvider (" <YOUR-CONFIGCAT-SDK-KEY>" ) {
26- pollingMode = autoPoll { pollingInterval = 60 .seconds }
27- }
24+ coroutineScope.launch(Dispatchers .IO ) {
25+ // Configure the provider.
26+ val provider = ConfigCatProvider (" <YOUR-CONFIGCAT-SDK-KEY>" ) {
27+ pollingMode = autoPoll { pollingInterval = 60 .seconds }
28+ }
2829
29- // Configure the OpenFeature API with the ConfigCat provider.
30- OpenFeatureAPI .setProviderAndWait(provider)
30+ // Configure the OpenFeature API with the ConfigCat provider.
31+ OpenFeatureAPI .setProviderAndWait(provider)
3132
32- // Create a client.
33- val client = OpenFeatureAPI .getClient()
33+ // Create a client.
34+ val client = OpenFeatureAPI .getClient()
3435
35- // Evaluate feature flag.
36- val isAwesomeFeatureEnabled = client.getBooleanDetails(" isAwesomeFeatureEnabled" , false )
36+ // Evaluate feature flag.
37+ val isAwesomeFeatureEnabled = client.getBooleanDetails(" isAwesomeFeatureEnabled" , false )
38+ }
3739```
3840
3941For more information about all the configuration options, see
You can’t perform that action at this time.
0 commit comments