Class LDClient

java.lang.Object
com.launchdarkly.sdk.android.LDClient
All Implemented Interfaces:
LDClientInterface, Closeable, AutoCloseable

public class LDClient extends Object implements LDClientInterface, Closeable
Client for accessing LaunchDarkly's Feature Flag system. This class enforces a singleton pattern. The main entry point is the init(Application, LDConfig, LDContext) method.

Like all client-side LaunchDarkly SDKs, the LDClient always has a single current LDContext (evaluation context). You specify this context at initialization time, and you can change it later with identify(LDContext). All subsequent calls to evaluation methods like boolVariation(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's key; see LDConfig.Builder.generateAnonymousKeys(boolean).