You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importcom.launchdarkly.sdk.LDContext;
importcom.launchdarkly.sdk.server.LDClient;
classTest {
publicvoida() {
LDClientclient = newLDClient("sdk-key");
LDContextcontext = LDContext.builder("context-key")
.name("user")
.build();
booleanflagValue = client.boolVariation("flag-key-123abc", context, false);
if (flagValue) {
// Application code to show the feature
} else {
// The code to run if the feature is off
}
}
}
After:
importcom.launchdarkly.sdk.LDContext;
importcom.launchdarkly.sdk.server.LDClient;
classTest {
publicvoida() {
LDClientclient = newLDClient("sdk-key");
LDContextcontext = LDContext.builder("context-key")
/*~~>*/.name("user")
.build();
booleanflagValue = client.boolVariation("flag-key-123abc", context, false);
if (flagValue) {
// Application code to show the feature
} else {
// The code to run if the feature is off
}
}
}
Custom Attribute
Before:
importcom.launchdarkly.sdk.LDContext;
importcom.launchdarkly.sdk.server.LDClient;
classTest {
publicvoida() {
LDClientclient = newLDClient("sdk-key");
LDContextcontext = LDContext.builder("context-key")
.name("user")
.set("email", "[email protected]")
.build();
booleanflagValue = client.boolVariation("flag-key-123abc", context, false);
if (flagValue) {
// Application code to show the feature
} else {
// The code to run if the feature is off
}
}
}
After:
importcom.launchdarkly.sdk.LDContext;
importcom.launchdarkly.sdk.server.LDClient;
classTest {
publicvoida() {
LDClientclient = newLDClient("sdk-key");
LDContextcontext = LDContext.builder("context-key")
.name("user")
/*~~>*/.set("email", "[email protected]")
.build();
booleanflagValue = client.boolVariation("flag-key-123abc", context, false);
if (flagValue) {
// Application code to show the feature
} else {
// The code to run if the feature is off
}
}
}
The text was updated successfully, but these errors were encountered:
Parameters:
Built-in attribute
Before:
After:
Custom Attribute
Before:
After:
The text was updated successfully, but these errors were encountered: