Class LDClient
- java.lang.Object
-
- com.launchdarkly.sdk.android.LDClient
-
- All Implemented Interfaces:
LDClientInterface,java.io.Closeable,java.lang.AutoCloseable
public class LDClient extends java.lang.Object implements LDClientInterface, java.io.Closeable
Client for accessing LaunchDarkly's Feature Flag system. This class enforces a singleton pattern. The main entry point is theinit(Application, LDConfig, LDContext)method.Like all client-side LaunchDarkly SDKs, the
LDClientalways has a single currentLDContext(evaluation context). You specify this context at initialization time, and you can change it later withidentify(LDContext). All subsequent calls to evaluation methods likeboolVariation(java.lang.String, boolean)refer to the flag values for the current context.Normally, the SDK uses the exact context that you have specified in th
LDContext. However, you can also tell the SDK to generate a randomized identifier and use this as the context'skey; seeLDConfig.Builder.generateAnonymousKeys(boolean).
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLDClient(com.launchdarkly.sdk.android.PlatformState platformState, IEnvironmentReporter environmentReporter, com.launchdarkly.sdk.android.TaskExecutor taskExecutor, com.launchdarkly.sdk.android.PersistentDataStoreWrapper.PerEnvironmentData environmentStore, LDContext initialContext, LDConfig config, java.lang.String mobileKey, java.lang.String environmentName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,LDValue>allFlags()Returns a map of all feature flags for the current evaluation context.booleanboolVariation(java.lang.String key, boolean defaultValue)Returns the boolean value of a feature flag for the current evaluation context.EvaluationDetail<java.lang.Boolean>boolVariationDetail(java.lang.String key, boolean defaultValue)Returns the boolean value of a feature flag for the current evaluation context, along with information about how it was calculated.voidclose()Closes the client.doubledoubleVariation(java.lang.String flagKey, double defaultValue)Returns the double-precision floating-point numeric value of a feature flag for the current evaluation context.EvaluationDetail<java.lang.Double>doubleVariationDetail(java.lang.String flagKey, double defaultValue)Returns the double-precision floating-point numeric value of a feature flag for the current evaluation context, along with information about how it was calculated.voidflush()Sends all pending events to LaunchDarkly.static LDClientget()Returns theLDClientinstance that was previously created withinit(Application, LDConfig, LDContext, int)orinit(Application, LDConfig, LDContext).ConnectionInformationgetConnectionInformation()Gets aConnectionInformationobject from the client representing the current state of the clients connection.static LDClientgetForMobileKey(java.lang.String keyName)Returns theLDClientinstance that was previously created withinit(Application, LDConfig, LDContext, int)orinit(Application, LDConfig, LDContext), for a specific environment.java.lang.StringgetVersion()Returns the version of the SDK, for instance "2.7.0".java.util.concurrent.Future<java.lang.Void>identify(LDContext context)Changes the current evaluation context, requests flags for that context from LaunchDarkly if we are online, and generates an analytics event to tell LaunchDarkly about the context.static java.util.concurrent.Future<LDClient>init(android.app.Application application, LDConfig config, LDContext context)Initializes the singleton/primary instance.static LDClientinit(android.app.Application application, LDConfig config, LDContext context, int startWaitSeconds)Initializes the singleton instance and blocks for up tostartWaitSecondsseconds until the client has been initialized.intintVariation(java.lang.String key, int defaultValue)Returns the integer value of a feature flag for the current evaluation context.EvaluationDetail<java.lang.Integer>intVariationDetail(java.lang.String key, int defaultValue)Returns the integer value of a feature flag for the current evaluation context, along with information about how it was calculated.booleanisDisableBackgroundPolling()Checks whetherLDConfig.Builder.disableBackgroundUpdating(boolean)was set totruein the configuration.booleanisInitialized()Checks whether the client is ready to return feature flag values.booleanisOffline()Checks whether the client has been put into offline mode.LDValuejsonValueVariation(java.lang.String key, LDValue defaultValue)Returns the value of a feature flag for the current evaluation context, which may be of any type.EvaluationDetail<LDValue>jsonValueVariationDetail(java.lang.String key, LDValue defaultValue)Returns the value of a feature flag for the current evaluation context, which may be of any type, along with information about how it was calculated.voidregisterAllFlagsListener(LDAllFlagsListener allFlagsListener)Registers aLDAllFlagsListenerto be called when a flag update is processed by the SDK.voidregisterFeatureFlagListener(java.lang.String flagKey, FeatureFlagChangeListener listener)Registers aFeatureFlagChangeListenerto be called when theflagKeychanges from its current value.voidregisterStatusListener(LDStatusListener statusListener)Registers aLDStatusListenerto be called on connection status updates.voidsetOffline()Shuts down any network connections maintained by the client and puts the client in offline mode, preventing the client from opening new network connections untilsetOnline()is called.voidsetOnline()Restores network connectivity for the client, if the client was previously in offline mode.java.lang.StringstringVariation(java.lang.String key, java.lang.String defaultValue)Returns the string value of a feature flag for the current evaluation context.EvaluationDetail<java.lang.String>stringVariationDetail(java.lang.String key, java.lang.String defaultValue)Returns the string value of a feature flag for the current evaluation context, along with information about how it was calculated.voidtrack(java.lang.String eventName)Tracks that an application-defined event occurred.voidtrackData(java.lang.String eventName, LDValue data)Tracks that an application-defined event occurred, and provides additional custom data.voidtrackMetric(java.lang.String eventName, LDValue data, double metricValue)Tracks that an application-defined event occurred, and provides an additional numeric value for custom metrics.voidunregisterAllFlagsListener(LDAllFlagsListener allFlagsListener)Unregisters aLDAllFlagsListenerso it will no longer be called on flag updates.voidunregisterFeatureFlagListener(java.lang.String flagKey, FeatureFlagChangeListener listener)Unregisters aFeatureFlagChangeListenerfor theflagKey.voidunregisterStatusListener(LDStatusListener statusListener)Unregisters aLDStatusListenerso it will no longer be called on connection status updates.
-
-
-
Constructor Detail
-
LDClient
protected LDClient(@NonNull com.launchdarkly.sdk.android.PlatformState platformState, @NonNull IEnvironmentReporter environmentReporter, @NonNull com.launchdarkly.sdk.android.TaskExecutor taskExecutor, @NonNull com.launchdarkly.sdk.android.PersistentDataStoreWrapper.PerEnvironmentData environmentStore, @NonNull LDContext initialContext, @NonNull LDConfig config, @NonNull java.lang.String mobileKey, @NonNull java.lang.String environmentName) throws LaunchDarklyException- Throws:
LaunchDarklyException
-
-
Method Detail
-
init
public static java.util.concurrent.Future<LDClient> init(@NonNull android.app.Application application, @NonNull LDConfig config, @NonNull LDContext context)
Initializes the singleton/primary instance. The result is aFuturewhich will complete once the client has been initialized with the latest feature flag values. For immediate access to the Client (possibly with out of date feature flags), it is safe to ignore the return value of this method, and afterward callget()If the client has already been initialized, is configured for offline mode, or the device is not connected to the internet, this method will return a
Futurethat is already in the completed state.- Parameters:
application- your Android applicationconfig- configuration used to set up the clientcontext- the initial evaluation context; seeLDClientfor more information about setting the context and optionally requesting a unique key for it- Returns:
- a
Futurewhich will complete once the client has been initialized - Since:
- 3.0.0
- See Also:
init(Application, LDConfig, LDContext, int)
-
init
public static LDClient init(android.app.Application application, LDConfig config, LDContext context, int startWaitSeconds)
Initializes the singleton instance and blocks for up tostartWaitSecondsseconds until the client has been initialized. If the client does not initialize withinstartWaitSecondsseconds, it is returned anyway and can be used, but may not have fetched the most recent feature flag values.- Parameters:
application- your Android applicationconfig- configuration used to set up the clientcontext- the initial evaluation context; seeLDClientfor more information about setting the context and optionally requesting a unique key for itstartWaitSeconds- maximum number of seconds to wait for the client to initialize- Returns:
- the primary LDClient instance
- Since:
- 3.0.0
- See Also:
init(Application, LDConfig, LDContext)
-
get
public static LDClient get() throws LaunchDarklyException
Returns theLDClientinstance that was previously created withinit(Application, LDConfig, LDContext, int)orinit(Application, LDConfig, LDContext).If you have configured multiple environments, this method returns the instance for the primary environment.
- Returns:
- the singleton instance
- Throws:
LaunchDarklyException- ifinithas not been called- See Also:
getForMobileKey(String)
-
getForMobileKey
public static LDClient getForMobileKey(java.lang.String keyName) throws LaunchDarklyException
Returns theLDClientinstance that was previously created withinit(Application, LDConfig, LDContext, int)orinit(Application, LDConfig, LDContext), for a specific environment.This method is only relevant if you have configured multiple environments with
LDConfig.Builder.secondaryMobileKeys(Map).- Parameters:
keyName- the name you gave to this environment (this must be one of the keys in the map you passed toLDConfig.Builder.secondaryMobileKeys(Map))- Returns:
- the singleton instance for the environment associated with the given name
- Throws:
LaunchDarklyException- ifinithas not been called- See Also:
get()
-
trackMetric
public void trackMetric(java.lang.String eventName, LDValue data, double metricValue)Description copied from interface:LDClientInterfaceTracks that an application-defined event occurred, and provides an additional numeric value for custom metrics.This method creates a "custom" analytics event containing the specified event name (key) the current evaluation context, optional custom data, and a numeric metric value.
Note that event delivery is asynchronous, so the event may not actually be sent until later; see
LDClientInterface.flush().- Specified by:
trackMetricin interfaceLDClientInterface- Parameters:
eventName- the name of the eventdata- anLDValuecontaining additional data associated with the event; if not applicable, you may pass eithernullorLDValue.ofNull()metricValue- a numeric value used by the LaunchDarkly experimentation feature in numeric custom metrics; this field will also be returned as part of the custom event for Data Export- See Also:
LDClientInterface.track(String),LDClientInterface.trackData(String, LDValue)
-
trackData
public void trackData(java.lang.String eventName, LDValue data)Description copied from interface:LDClientInterfaceTracks that an application-defined event occurred, and provides additional custom data.This method creates a "custom" analytics event containing the specified event name (key) the current evaluation context, and optional custom data. To specify a numeric metric, use
LDClientInterface.trackMetric(String, LDValue, double)instead.Note that event delivery is asynchronous, so the event may not actually be sent until later; see
LDClientInterface.flush().- Specified by:
trackDatain interfaceLDClientInterface- Parameters:
eventName- the name of the eventdata- anLDValuecontaining additional data associated with the event; if not applicable, you may pass eithernullorLDValue.ofNull()- See Also:
LDClientInterface.track(String),LDClientInterface.trackMetric(String, LDValue, double)
-
track
public void track(java.lang.String eventName)
Description copied from interface:LDClientInterfaceTracks that an application-defined event occurred.This method creates a "custom" analytics event containing the specified event name (key) and the current evaluation context. You may attach other data to the event by calling
LDClientInterface.trackData(String, LDValue)orLDClientInterface.trackMetric(String, LDValue, double)instead.Note that event delivery is asynchronous, so the event may not actually be sent until later; see
LDClientInterface.flush().- Specified by:
trackin interfaceLDClientInterface- Parameters:
eventName- the name of the event- See Also:
LDClientInterface.trackData(String, LDValue),LDClientInterface.trackMetric(String, LDValue, double)
-
identify
public java.util.concurrent.Future<java.lang.Void> identify(LDContext context)
Description copied from interface:LDClientInterfaceChanges the current evaluation context, requests flags for that context from LaunchDarkly if we are online, and generates an analytics event to tell LaunchDarkly about the context.If the SDK is online, the returned
Futureis completed once the SDK has received feature flag values for the new context from LaunchDarkly, or received an unrecoverable error. If the SDK is offline, the returnedFutureis completed immediately.The SDK normally caches flag settings for recently used evaluation contexts; this behavior can be configured with
LDConfig.Builder.maxCachedContexts(int).- Specified by:
identifyin interfaceLDClientInterface- Parameters:
context- the new evaluation context; seeLDClientfor more about setting the context and optionally requesting a unique key for it- Returns:
- a Future whose success indicates the flag values for the new evaluation context have been stored locally and are ready for use
-
allFlags
public java.util.Map<java.lang.String,LDValue> allFlags()
Description copied from interface:LDClientInterfaceReturns a map of all feature flags for the current evaluation context. No events are sent to LaunchDarkly.- Specified by:
allFlagsin interfaceLDClientInterface- Returns:
- a map of all feature flags
-
boolVariation
public boolean boolVariation(@NonNull java.lang.String key, boolean defaultValue)Description copied from interface:LDClientInterfaceReturns the boolean value of a feature flag for the current evaluation context.If the flag variation does not have a boolean value, or if an error makes it impossible to evaluate the flag (for instance, if
flagKeydoes not match any existing flag),defaultValueis returned.- Specified by:
boolVariationin interfaceLDClientInterface- Parameters:
key- key for the flag to evaluatedefaultValue- default value in case of errors evaluating the flag- Returns:
- value of the flag or the default value
-
boolVariationDetail
public EvaluationDetail<java.lang.Boolean> boolVariationDetail(@NonNull java.lang.String key, boolean defaultValue)
Description copied from interface:LDClientInterfaceReturns the boolean value of a feature flag for the current evaluation context, along with information about how it was calculated.Note that this will only work if you have set
evaluationReasonsto true withLDConfig.Builder.evaluationReasons(boolean). Otherwise, thereasonproperty of the result will be null.The evaluation reason will also be included in analytics events, if you are capturing detailed event data for this flag.
- Specified by:
boolVariationDetailin interfaceLDClientInterface- Parameters:
key- key for the flag to evaluatedefaultValue- default value in case of errors evaluating the flag (seeLDClientInterface.boolVariation(String, boolean))- Returns:
- an
EvaluationDetailobject containing the value and other information
-
intVariation
public int intVariation(@NonNull java.lang.String key, int defaultValue)Description copied from interface:LDClientInterfaceReturns the integer value of a feature flag for the current evaluation context.If the flag variation has a numeric value that is not an integer, it is rounded toward zero.
If the flag variation does not have a numeric value, or if an error makes it impossible to evaluate the flag (for instance, if
flagKeydoes not match any existing flag),defaultValueis returned.- Specified by:
intVariationin interfaceLDClientInterface- Parameters:
key- key for the flag to evaluatedefaultValue- default value in case of errors evaluating the flag- Returns:
- value of the flag or the default value
-
intVariationDetail
public EvaluationDetail<java.lang.Integer> intVariationDetail(@NonNull java.lang.String key, int defaultValue)
Description copied from interface:LDClientInterfaceReturns the integer value of a feature flag for the current evaluation context, along with information about how it was calculated.Note that this will only work if you have set
evaluationReasonsto true withLDConfig.Builder.evaluationReasons(boolean). Otherwise, thereasonproperty of the result will be null.The evaluation reason will also be included in analytics events, if you are capturing detailed event data for this flag.
The behavior is otherwise identical to
LDClientInterface.intVariation(java.lang.String, int).- Specified by:
intVariationDetailin interfaceLDClientInterface- Parameters:
key- key for the flag to evaluatedefaultValue- default value in case of errors evaluating the flag (seeLDClientInterface.intVariation(String, int))- Returns:
- an
EvaluationDetailobject containing the value and other information
-
doubleVariation
public double doubleVariation(java.lang.String flagKey, double defaultValue)Description copied from interface:LDClientInterfaceReturns the double-precision floating-point numeric value of a feature flag for the current evaluation context.If the flag variation does not have a numeric value, or if an error makes it impossible to evaluate the flag (for instance, if
flagKeydoes not match any existing flag),defaultValueis returned.- Specified by:
doubleVariationin interfaceLDClientInterface- Parameters:
flagKey- key for the flag to evaluatedefaultValue- default value in case of errors evaluating the flag- Returns:
- value of the flag or the default value
-
doubleVariationDetail
public EvaluationDetail<java.lang.Double> doubleVariationDetail(java.lang.String flagKey, double defaultValue)
Description copied from interface:LDClientInterfaceReturns the double-precision floating-point numeric value of a feature flag for the current evaluation context, along with information about how it was calculated. Note that this will only work if you have setevaluationReasonsto true withLDConfig.Builder.evaluationReasons(boolean). Otherwise, thereasonproperty of the result will be null.The evaluation reason will also be included in analytics events, if you are capturing detailed event data for this flag.
The behavior is otherwise identical to
LDClientInterface.doubleVariation(java.lang.String, double).- Specified by:
doubleVariationDetailin interfaceLDClientInterface- Parameters:
flagKey- key for the flag to evaluatedefaultValue- default value in case of errors evaluating the flag (seeLDClientInterface.doubleVariation(String, double))- Returns:
- an
EvaluationDetailobject containing the value and other information.
-
stringVariation
public java.lang.String stringVariation(@NonNull java.lang.String key, java.lang.String defaultValue)Description copied from interface:LDClientInterfaceReturns the string value of a feature flag for the current evaluation context.If the flag variation does not have a string value, or if an error makes it impossible to evaluate the flag (for instance, if
flagKeydoes not match any existing flag),defaultValueis returned.- Specified by:
stringVariationin interfaceLDClientInterface- Parameters:
key- key for the flag to evaluatedefaultValue- default value in case of errors evaluating the flag- Returns:
- value of the flag or the default value
-
stringVariationDetail
public EvaluationDetail<java.lang.String> stringVariationDetail(@NonNull java.lang.String key, java.lang.String defaultValue)
Description copied from interface:LDClientInterfaceReturns the string value of a feature flag for the current evaluation context, along with information about how it was calculated.Note that this will only work if you have set
evaluationReasonsto true withLDConfig.Builder.evaluationReasons(boolean). Otherwise, thereasonproperty of the result will be null.The evaluation reason will also be included in analytics events, if you are capturing detailed event data for this flag.
The behavior is otherwise identical to
LDClientInterface.stringVariation(java.lang.String, java.lang.String).- Specified by:
stringVariationDetailin interfaceLDClientInterface- Parameters:
key- key for the flag to evaluatedefaultValue- default value in case of errors evaluating the flag (seeLDClientInterface.stringVariation(String, String))- Returns:
- an
EvaluationDetailobject containing the value and other information.
-
jsonValueVariation
public LDValue jsonValueVariation(@NonNull java.lang.String key, LDValue defaultValue)
Description copied from interface:LDClientInterfaceReturns the value of a feature flag for the current evaluation context, which may be of any type.The type
LDValueis used to represent any of the value types that can exist in JSON. UseLDValuemethods to examine its type and value.- Specified by:
jsonValueVariationin interfaceLDClientInterface- Parameters:
key- key for the flag to evaluatedefaultValue- default value in case of errors evaluating the flag- Returns:
- value of the flag or the default value. Result will never be null, but may be LDValue#ofNull()
-
jsonValueVariationDetail
public EvaluationDetail<LDValue> jsonValueVariationDetail(@NonNull java.lang.String key, LDValue defaultValue)
Description copied from interface:LDClientInterfaceReturns the value of a feature flag for the current evaluation context, which may be of any type, along with information about how it was calculated.The type
LDValueis used to represent any of the value types that can exist in JSON. UseLDValuemethods to examine its type and value.Note that this will only work if you have set
evaluationReasonsto true withLDConfig.Builder.evaluationReasons(boolean). Otherwise, thereasonproperty of the result will be null.The evaluation reason will also be included in analytics events, if you are capturing detailed event data for this flag.
The behavior is otherwise identical to
LDClientInterface.jsonValueVariation(java.lang.String, com.launchdarkly.sdk.LDValue).- Specified by:
jsonValueVariationDetailin interfaceLDClientInterface- Parameters:
key- key for the flag to evaluatedefaultValue- default value in case of errors evaluating the flag (seeLDClientInterface.jsonValueVariation(String, LDValue))- Returns:
- an
EvaluationDetailobject containing the value and other information.
-
close
public void close() throws java.io.IOExceptionCloses the client. This should only be called at the end of a client's lifecycle.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException- declared by the Closeable interface, but will not be thrown by the client
-
flush
public void flush()
Description copied from interface:LDClientInterfaceSends all pending events to LaunchDarkly.- Specified by:
flushin interfaceLDClientInterface
-
isInitialized
public boolean isInitialized()
Description copied from interface:LDClientInterfaceChecks whether the client is ready to return feature flag values. This is true if either the client has successfully connected to LaunchDarkly and received feature flags, or the client has been put into offline mode (in which case it will return only default flag values).- Specified by:
isInitializedin interfaceLDClientInterface- Returns:
- true if the client is initialized or offline
-
isOffline
public boolean isOffline()
Description copied from interface:LDClientInterfaceChecks whether the client has been put into offline mode. This is true only ifLDClientInterface.setOffline()was called, or if the configuration hadLDConfig.Builder.offline(boolean)set to true, not if the client is simply offline due to a loss of network connectivity.- Specified by:
isOfflinein interfaceLDClientInterface- Returns:
- true if the client is in offline mode
-
setOffline
public void setOffline()
Description copied from interface:LDClientInterfaceShuts down any network connections maintained by the client and puts the client in offline mode, preventing the client from opening new network connections untilsetOnline()is called.Note: The client automatically monitors the device's network connectivity and app foreground status, so calling
setOffline()orsetOnline()is normally unnecessary in most situations.- Specified by:
setOfflinein interfaceLDClientInterface
-
setOnline
public void setOnline()
Description copied from interface:LDClientInterfaceRestores network connectivity for the client, if the client was previously in offline mode. This operation may be throttled if it is called too frequently.Note: The client automatically monitors the device's network connectivity and app foreground status, so calling
setOffline()orsetOnline()is normally unnecessary in most situations.- Specified by:
setOnlinein interfaceLDClientInterface
-
registerFeatureFlagListener
public void registerFeatureFlagListener(java.lang.String flagKey, FeatureFlagChangeListener listener)Description copied from interface:LDClientInterfaceRegisters aFeatureFlagChangeListenerto be called when theflagKeychanges from its current value. If the feature flag is deleted, thelistenerwill be unregistered.- Specified by:
registerFeatureFlagListenerin interfaceLDClientInterface- Parameters:
flagKey- the flag key to attach the listener tolistener- the listener to attach to the flag key- See Also:
LDClientInterface.unregisterFeatureFlagListener(String, FeatureFlagChangeListener)
-
unregisterFeatureFlagListener
public void unregisterFeatureFlagListener(java.lang.String flagKey, FeatureFlagChangeListener listener)Description copied from interface:LDClientInterfaceUnregisters aFeatureFlagChangeListenerfor theflagKey.- Specified by:
unregisterFeatureFlagListenerin interfaceLDClientInterface- Parameters:
flagKey- the flag key to remove the listener fromlistener- the listener to remove from the flag key- See Also:
LDClientInterface.registerFeatureFlagListener(String, FeatureFlagChangeListener)
-
isDisableBackgroundPolling
public boolean isDisableBackgroundPolling()
Description copied from interface:LDClientInterfaceChecks whetherLDConfig.Builder.disableBackgroundUpdating(boolean)was set totruein the configuration.- Specified by:
isDisableBackgroundPollingin interfaceLDClientInterface- Returns:
- true if background polling is disabled
-
getConnectionInformation
public ConnectionInformation getConnectionInformation()
Description copied from interface:LDClientInterfaceGets aConnectionInformationobject from the client representing the current state of the clients connection.- Specified by:
getConnectionInformationin interfaceLDClientInterface- Returns:
- An object representing the status of the connection to LaunchDarkly.
-
registerStatusListener
public void registerStatusListener(LDStatusListener statusListener)
Description copied from interface:LDClientInterfaceRegisters aLDStatusListenerto be called on connection status updates.- Specified by:
registerStatusListenerin interfaceLDClientInterface- Parameters:
statusListener- the listener to be called on a connection status update
-
unregisterStatusListener
public void unregisterStatusListener(LDStatusListener statusListener)
Description copied from interface:LDClientInterfaceUnregisters aLDStatusListenerso it will no longer be called on connection status updates.- Specified by:
unregisterStatusListenerin interfaceLDClientInterface- Parameters:
statusListener- the listener to be removed
-
registerAllFlagsListener
public void registerAllFlagsListener(LDAllFlagsListener allFlagsListener)
Description copied from interface:LDClientInterfaceRegisters aLDAllFlagsListenerto be called when a flag update is processed by the SDK.- Specified by:
registerAllFlagsListenerin interfaceLDClientInterface- Parameters:
allFlagsListener- the listener to be called with a list of flag keys on a flag update
-
unregisterAllFlagsListener
public void unregisterAllFlagsListener(LDAllFlagsListener allFlagsListener)
Description copied from interface:LDClientInterfaceUnregisters aLDAllFlagsListenerso it will no longer be called on flag updates.- Specified by:
unregisterAllFlagsListenerin interfaceLDClientInterface- Parameters:
allFlagsListener- the listener to be removed
-
getVersion
public java.lang.String getVersion()
Description copied from interface:LDClientInterfaceReturns the version of the SDK, for instance "2.7.0".- Specified by:
getVersionin interfaceLDClientInterface- Returns:
- the version string
-
-