Skip to content

Releases: launchdarkly/android-client-sdk

4.2.0

12 Jan 01:28
Compare
Choose a tag to compare

[4.2.0] - 2023-01-11

Added:

  • LDConfig.Builder.applicationInfo(), for configuration of application metadata that may be used in LaunchDarkly analytics or other product features. This does not affect feature flag evaluations.

3.6.0

11 Jan 23:18
Compare
Choose a tag to compare

[3.6.0] - 2023-01-11

Added:

  • LDConfig.Builder.applicationInfo(), for configuration of application metadata that may be used in LaunchDarkly analytics or other product features. This does not affect feature flag evaluations.

3.5.1

07 Jan 02:16
Compare
Choose a tag to compare

[3.5.1] - 2023-01-06

Fixed:

  • The fix for unnecessarily long-lived polling connections in the 3.2.2 release was incomplete: rather than turning off the keep-alive behavior, it only reduced it from 10 minutes to 5 minutes. It should now close the connection immediately after each request as intended.

4.1.0

23 Dec 01:21
Compare
Choose a tag to compare

[4.1.0] - 2022-12-22

Added:

  • StreamingDataSourceBuilder.streamEvenInBackground, an option for allowing the SDK to maintain a streaming data connection even when the application is in the background.

3.5.0

23 Dec 01:38
Compare
Choose a tag to compare

[3.5.0] - 2022-12-22

Added:

  • StreamingDataSourceBuilder.streamEvenInBackground, an option for allowing the SDK to maintain a streaming data connection even when the application is in the background.

3.4.0

23 Dec 01:07
Compare
Choose a tag to compare

This release is broken and should not be used. It was an accidental duplicate of 4.1.0.

3.3.1

21 Dec 23:46
Compare
Choose a tag to compare

[3.3.1] - 2022-12-21

Fixed:

  • If the application is in the background when the SDK is started, the SDK will go into polling mode and immediately make a flag data request to LaunchDarkly. Previously, in this scenario the first poll would not happen until the background poll interval elapsed, so the SDK would effectively never have flag data at initialization time for an app or service that started in the background.

4.0.1

19 Dec 23:43
Compare
Choose a tag to compare

[4.0.1] - 2022-12-19

Fixed:

  • If the application is in the background when the SDK is started, the SDK will go into polling mode and immediately make a flag data request to LaunchDarkly. Previously, in this scenario the first poll would not happen until the background poll interval elapsed, so the SDK would effectively never have flag data at initialization time for an app or service that started in the background.

4.0.0

07 Dec 19:09
Compare
Choose a tag to compare

[4.0.0] - 2022-12-07

The latest version of this SDK supports LaunchDarkly's new custom contexts feature. Contexts are an evolution of a previously-existing concept, "users." Contexts let you create targeting rules for feature flags based on a variety of different information, including attributes pertaining to users, organizations, devices, and more. You can even combine contexts to create "multi-contexts."

This feature is only available to members of LaunchDarkly's Early Access Program (EAP). If you're in the EAP, you can use contexts by updating your SDK to the latest version and, if applicable, updating your Relay Proxy. Outdated SDK versions do not support contexts, and will cause unpredictable flag evaluation behavior.

If you are not in the EAP, only use single contexts of kind "user", or continue to use the user type if available. If you try to create contexts, the context will be sent to LaunchDarkly, but any data not related to the user object will be ignored.

For detailed information about this version, please refer to the list below. For information on how to upgrade from the previous version, please read the migration guide.

Added:

  • In com.launchDarkly.sdk, the types LDContext and ContextKind define the new context model.
  • For all SDK methods that took an LDUser parameter, there is now an overload that takes an LDContext. The SDK still supports LDUser for now, but LDContext is the preferred model and LDUser may be removed in a future version.
  • The TestData class in com.launchdarkly.sdk.android.integrations is a new way to inject feature flag data programmatically into the SDK for testing—either with fixed values for each flag, or with targeting logic that can return different values for different contexts.

Changed (breaking changes from 3.x):

  • It was previously allowable to set a user key to an empty string. In the new context model, the key is not allowed to be empty. Trying to use an empty key will cause evaluations to fail and return the default value.
  • There is no longer such a thing as a secondary meta-attribute that affects percentage rollouts. If you set an attribute with that name in LDContext, it will simply be a custom attribute like any other.
  • The anonymous attribute in LDUser is now a simple boolean, with no distinction between a false state and a null state.

Changed (behavioral changes):

  • The SDK no longer uses Android's AlarmManager API to schedule background polling of flag data. Instead, it uses a simple worker thread. AlarmManager notifications could wake up a sleeping device, which is not desirable just for getting flag data.
  • Analytics event data now uses a new JSON schema due to differences between the context model and the old user model.
  • The SDK no longer adds device and os values to the user attributes. Applications that wish to use device/OS information in feature flag rules must explicitly add such information.

Removed:

  • Removed all types, fields, and methods that were deprecated as of the most recent 3.x release.
  • Removed the secondary meta-attribute in LDUser and LDUser.Builder.
  • The alias method no longer exists because alias events are not needed in the new context model.
  • The autoAliasingOptOut and inlineUsersInEvents options no longer exist because they are not relevant in the new context model.

3.3.0

02 Dec 23:23
Compare
Choose a tag to compare

[3.3.0] - 2022-12-02

The primary purpose of this release is to introduce newer APIs for SDK configuration, corresponding to how configuration will work in the upcoming 4.0 release. The corresponding older APIs are now deprecated; switching from them to the newer ones now will facilitate migrating to 4.0 in the future. This also brings the Android SDK's API closer in line with other current LaunchDarkly SDKs, such as the Java SDK and the .NET SDKs.

Previously, most configuration options were set by setter methods in LDConfig.Builder. These are being superseded by builders that are specific to one area of functionality: for instance, Components.streamingDataSource() and Components.pollingDataSource() provide builders/factories that have options specific to streaming or polling, and the SDK's many options related to analytics events are now in a builder returned by Components.sendEvents(). Using this newer API makes it clearer which options are for what, and makes it impossible to write contradictory configurations like .stream(true).pollingIntervalMillis(30000).

The new configuration builders also include some options for SDK behavior that could not previously be configured; see "Added".

Added:

  • Components, containing factory methods for the various configuration builders.
  • Configuration builder classes in com.launchdarkly.sdk.android.integrations: StreamingDataSourceBuilder, PollingDataSourceBuilder, EventProcessorBuilder, HttpConfigurationBuilder, ServiceEndpointsBuilder.
  • It is now possible to entirely disable analytics events, by setting LDConfig.Builder.events() to Components.noEvents().
  • It is now possible to substitute a test fixture for the analytics events subsystem, by creating a custom implementation of com.launchdarkly.sdk.android.subsystems.EventProcessor.
  • It is now possible to change the initial delay for reconnecting after a stream connection failure, with StreamingDataSourceBuilder.initialReconnectDelayMillis().

Deprecated:

(all in LDConfig.Builder)

  • pollingIntervalMillis, stream: see PollingDataSourceBuilder.
  • backgroundPollingIntervalMillis: see PollingDataSourceBuilder and StreamingDataSourceBuilder.
  • allAttributesPrivate, diagnosticRecordingIntervalMillis, eventsCapacity, eventsFlushIntervalMillis, inlineUsersInEvents, privateAttributes: see EventProcessorBuilder.
  • connectionTimeoutMillis, headerTransform, useReport, wrapperName, wrapperVersion: see HttpConfigurationBuilder.
  • streamUri, pollUri, eventsUri: See ServiceEndpointsBuilder.