Releases: optimizely/java-sdk
2.0.0 Beta 7
2.0.0-beta7
March 29th, 2018
This major release of the Optimizely SDK introduces APIs for Feature Management. It also introduces some breaking changes listed below.
New Features
- Introduces the
isFeatureEnabled
API to determine whether to show a feature to a user or not.
Boolean enabled = optimizelyClient.isFeatureEnabled("my_feature_key", "user_1", userAttributes);
- You can also get all the enabled features for the user by calling the following method which returns a list of strings representing the feature keys:
ArrayList<String> enabledFeatures = optimizelyClient.getEnabledFeatures("user_1", userAttributes);
- Introduces Feature Variables to configure or parameterize your feature. There are four variable types:
Integer
,String
,Double
,Boolean
.
String stringVariable = optimizelyClient.getFeatureVariableString("my_feature_key", "string_variable_key", "user_1");
Integer integerVariable = optimizelyClient.getFeatureVariableInteger("my_feature_key", "integer_variable_key", "user_1");
Double doubleVariable = optimizelyClient.getFeatureVariableDouble("my_feature_key", "double_variable_key", "user_1");
Boolean booleanVariable = optimizelyClient.getFeatureVariableBoolean("my_feature_key", "boolean_variable_key", "user_1");
Breaking changes
- The
track
API with revenue value as a stand-alone parameter has been removed. The revenue value should be passed in as an entry of the event tags map. The key for the revenue tag isrevenue
and will be treated by Optimizely as the key for analyzing revenue data in results.
Map<String, Object> eventTags = new HashMap<String, Object>();
// reserved "revenue" tag
eventTags.put("revenue", 6432);
optimizelyClient.track("event_key", "user_id", userAttributes, eventTags);
2.0.0 Beta 6
This is a patch on 2.0.0-beta5.
New Features
This release includes a new API Optimizely#getEnabledFeatures()
that returns all features that are enabled for a given user.
Features are now enabled or disabled based on the featureEnabled
property in each variation the user is bucketed into.
2.0.0 Beta 5
February 26, 2018
This is a minor patch on 2.0.0-beta4.
This release upgrades the gradle wrapper to 4.5.1 and adds tasks for compiling unit coverage metrics to export to coveralls.
2.0.0 Beta 4
2.0.0 Beta 4
February 1, 2018
This release is a fourth beta release supporting feature flags and rollouts. It includes all the same new features and breaking as the last beta release. It also includes the latest Notification Listeners and bucketing Id changes from 1.9.0.
New Features
- New NotificationCenter for track and activate notifications.
- Use $opt_bucketing_id in your attribute list to support bucketing like users.
1.9.0
This release adds support for bucketing id (By passing in $opt_bucketing_id
in the attribute map to override the user id as the bucketing variable. This is useful when wanting a set of users to share the same experience such as two players in a game).
This release also deprecates the old notification broadcaster in favor of a notification center that supports a wide range of notifications. The notification listener is now registered for the specific notification type such as ACTIVATE and TRACK. This is accomplished by allowing for a variable argument call to notify (a new var arg method added to the NotificationListener). Specific abstract classes exist for the associated notification type (ActivateNotificationListener and TrackNotificationListener). These abstract classes enforce the strong typing that exists in Java. You may also add custom notification types and fire them through the notification center. The notification center is implemented using this var arg approach in all Optimizely SDKs.
New Features
- Added
$opt_bucketing_id
in the attribute map for overriding bucketing using the user id. It is available as a static string in DecisionService.ATTRIBUTE_BUCKETING_ID - Optimizely notification center for activate and track notifications.
Breaking change
There is a new abstract method on NotificationListener notify(args...);
2.0.0-beta3
2.0.0 Beta 3
January 5, 2018
This release is a third beta release supporting feature flags and rollouts. It includes all the same new features and breaking as the last beta release.
Bug Fixes
SDK checks for null values in the Feature API parameters.
- If isFeatureEnabled is called with a null featureKey or a null userId, it will return false immediately.
- If any of getFeatureVariable are called with a null featureKey, variableKey, or userId, null will be returned immediately.
1.8.1
1.8.1
December 12, 2017
This is a patch release for 1.8.0. It contains two bug fixes mentioned below.
Bug Fixes
SDK returns NullPointerException when activating with unknown attribute.
Pooled connection times out if it is idle for a long time (AsyncEventHandler's HttpClient uses PoolingHttpClientConnectionManager setting a validate interval).
2.0.0-beta2
2.0.0 Beta 2
October 5, 2017
This release is a second beta release supporting feature flags and rollouts. It includes all the same new features and breaking changes as the last beta release.
Bug Fixes
Fall back to default feature variable value when there is no variable usage in the variation a user is bucketed into. For more information see PR #149.
2.0.0-beta
2.0.0 Beta
September 29, 2017
This release is a beta release supporting feature flags and rollouts.
New Features
Feature Flag Accessors
You can now use feature flags in the Java SDK. You can experiment on features and rollout features through the Optimizely UI.
isFeatureEnabled
getFeatureVariableBoolean
getFeatureVariableDouble
getFeatureVariableInteger
getFeatureVariableString
Breaking Changes
- Remove Live Variables accessors
getVariableString
getVariableBoolean
getVariableInteger
getVariableDouble
- Remove track with revenue as a parameter. Pass the revenue value as an event tag instead
track(String, String, long)
track(String, String, Map<String, String>, long)
- We will no longer run all unit tests in travis-ci against Java 7.
We will still continue to setsourceCompatibility
andtargetCompatibility
to 1.6 so that we build for Java 6.
1.8.0
1.8.0
August 29, 2017
This release adds support for numeric metrics and forced bucketing (in code as opposed to whitelisting via project file).
New Features
- Added
setForcedVariation
andgetForcedVariation
- Added any numeric metric to event metrics.
Breaking Changes
- Nothing breaking from 1.7.0