Releases: optimizely/android-sdk
Release 3.0.0-RC
3.0.0-RC
November 9, 2018
This is a RC candidate for major release 3.0.0 with support of new audience match types.
New Features
- Support for number-valued and boolean-valued attributes. ([#213](https://githu
b.com/optimizely/java-sdk/pull/213)) - Support for audiences with new match conditions for attribute values, including “substring” and “exists” matches for strings; “greater than”, “less than”, exact, and “exists” matches for numbers; and “exact”, and “exists” matches for booleans.
- Built-in datafile version compatibility checks so that SDKs will not initialize with a newer datafile it is not compatible with. ([#209](https://github.com/op
timizely/java-sdk/pull/209)) - Audience combinations within an experiment are unofficially supported in this
release.
Breaking Changes
- Previously, notification listeners filtered non-string attribute values from t
he data passed to registered listeners. To support our growing list of supported attribute values, we’ve changed this behavior. Notification listeners will now post any value type passed as an attribute. Therefore, the interface of the notification listeners has changed to accept aMap<String, ?>
. - Update to use Java 1.7 (#208)
Bug Fixes
The attributes map is now copied to ensure there is no concurrency issues.
Release 2.1.2
2.1.2
November 8, 2018
This is a patch release.
Bug Fixes
Fix job scheduler exception when scheduling a repeatable job in the background (#236).
Release 2.1.1
Release 2.1.0
2.1.0
August 2nd, 2018
This release is the 2.x general availability launch of the Android SDK, which includes a number of significant new features that are now stable and fully supported. Feature Management is now generally available, which introduces new APIs and which replaces the SDK's variable APIs (getVariableBoolean
, etc.) with the feature variable APIs (getFeatureVariableBoolean
, etc.).
The primary difference between the new Feature Variable APIs and the older, Variable APIs is that they allow you to link your variables to a Feature (a new type of entity defined in the Optimizely UI) and to a feature flag in your application. This in turn allows you to run Feature Tests and Rollouts on both your Features and Feature Variables. For complete details of the Feature Management APIs, see the "New Features" section below.
To learn more about Feature Management, read our knowledge base article introducing the feature.
New Features
- Introduces the
isFeatureEnabled
API, a featue flag used to determine whether to show a feature to a user. TheisFeatureEnabled
should be used in place of theactivate
API to activate experiments running on features. Specifically, calling this API causes the SDK to evaluate all Feature Tests and Rollouts associated with the provided feature key.
Boolean enabled = optimizelyClient.isFeatureEnabled("my_feature_key", "user_1", userAttributes);
- Get all enabled features for a 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
. Note that unlike the Variable APIs, the Feature Variable APIs do not dispatch impression events. Instead, first callisFeatureEnabled
to activate your experiments, then retrieve your variables.
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");
- Introduces SDK Keys, which allow you to use Environments with the Android SDK. Use an SDK Key to initialize your OptimizelyManager, and the SDK will retrieve the datafile for the environment associated with the SDK Key. This replaces initialization with Project ID.
OptimizelyManager optimizelyManager = OptimizelyManager.builder()
.withSDKKey("SDK_KEY_HERE")
.build(getApplication());
optimizelyManager.initialize(this, new OptimizelyStartListener() {
@Override
public void onStart(OptimizelyClient optimizely) {
//user optimizely client here
}
});
Deprecations
-
Version 2.1.0 deprecates the Variable APIs:
getVariableBoolean
,getVariableFloat
,getVariableInteger
, andgetVariableString
-
Replace use of the Variable APIs with Feature Mangement's Feature Variable APIs, described above
-
We will continue to support the Variable APIs until the 3.x release, but we encourage you to upgrade as soon as possible
-
You will see a deprecation warning if using a 2.x SDK with the deprecated Variable APIs, but the APIs will continue to behave as they did in 1.x versions of the SDK
Upgrading from 1.x
In order to begin using Feature Management, you must discontinue use of 1.x variables in your experiments. First, pause and archive all experiments that use variables. Then, contact Optimizely Support in order to have your project converted from the 1.x SDK UI to the 2.x SDK UI. In addition to allowing for access to the Feature Management UI, upgrading to the 2.x SDK UI grants you access to Environments and other new features.
- Note: All future feature development on the Android SDK will assume that your are using the 2.x SDK UI, so we encourage you to upgrade as soon as possible.
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);
- We have removed deprecated classes with the
NotificationBroadcaster
in favor of the new API with theNotificationCenter
. We have streamlined the API so that it is easily usable with Java Lambdas in Java 1.8+. We have also added some convenience methods to add these listeners. Finally, some of the API names have changed slightly (e.g.clearAllNotifications()
is nowclearAllNotificationListeners()
)
Release 2.0.0-beta6
Release 2.0.0-beta5
2.0.0-beta5
July 23, 2018
Bug Fixes
- Pull from the correct datafile location when using SDK Key. (#207)
2.0.0-beta4
2.0.0-beta4
June 22, 2018
Bug Fixes
- Fix impression sent from feature experiment variation toggled off. (#205)
2.0.0-beta3
2.0.0-beta3
June 12, 2018
This beta release of the Optimizely SDK introduces APIs for Feature Management.
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");
-
Live variable accessor methods have added back in for backward compatibility.
-
Support for all Full Stack project types.
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);
- We have removed deprecated classes with the
NotificationBroadcaster
in favor of the new API with theNotificationCenter
. We have streamlined the API so that it is easily usable with Java Lambdas in Java 1.8+. We have also added some convenience methods to add these listeners. Finally, some of the API names have changed slightly (e.g.clearAllNotifications()
is nowclearAllNotificationListeners()
)
Bug Fixes
-
Fix for the following issue:
https://issuetracker.google.com/issues/63622293
Our github issue is here.
The JobWorkService was probably destroyed but we didn't cancel the
processor. It causes an exception in dequeueWork in our JobWorkService.
We wrapped the dequeueWork with a try/catch and are also now cancelling the background task in onDestroy. -
Fix for possible error when loading logger via dagger (fall back logger provided).
-
Load UserProfileService on synchronous start. Also, cleanup UserProfileService cache in the background thread by removing experiments that are no longer in the datafile.
2.0.0-beta2
2.0.0-beta2
May 17th, 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);
-
Live variable accessor methods have been removed and have been replaced with the feature variable methods mentioned above. Feature variables are scoped to a feature so you must supply the feature key in addition to the variable key to access them.
getVariableBoolean
now becomesgetFeatureVariableBoolean
getVariableString
now becomesgetFeatureVariableString
getVariableInteger
now becomesgetFeatureVariableInteger
getVariableFloat
now becomesgetFeatureVariableDouble
-
We have removed deprecated classes with the
NotificationBroadcaster
in favor of the new API with theNotificationCenter
. We have streamlined the API so that it is easily usable with Java Lambdas in Java 1.8+. We have also added some convenience methods to add these listeners. Finally, some of the API names have changed slightly (e.g.clearAllNotifications()
is nowclearAllNotificationListeners()
)
Bug Fixes
-
Fix for the following issue:
https://issuetracker.google.com/issues/63622293
Our github issue is here.
The JobWorkService was probably destroyed but we didn't cancel the
processor. It causes an exception in dequeueWork in our JobWorkService.
We wrapped the dequeueWork with a try/catch and are also now cancelling the background task in onDestroy. -
Fix for possible error when loading logger via dagger (fall back logger provided).
-
Load UserProfileService on synchronous start. Also, cleanup UserProfileService cache in the background thread by removing experiments that are no longer in the datafile.
1.6.1 Release
1.6.1
April 25, 2018
- Release 1.6.1
This is a patch release for 1.6.0 and 1.5.1 Optimizely SDKs.
Bug Fixes
-
Fix for the following issue:
https://issuetracker.google.com/issues/63622293
Our github issue is here.
The JobWorkService was probably destroyed but we didn't cancel the
processor. It causes an exception in dequeueWork in our JobWorkService.
We wrapped the dequeueWork with a try/catch and are also now cancelling the background task in onDestroy. -
Fix for possible error when loading logger via dagger (fall back logger provided).