|
1 | 1 | # Optimizely Android X SDK Changelog
|
2 | 2 |
|
| 3 | +## 2.0.0 |
| 4 | + |
| 5 | +April 25th, 2018 |
| 6 | + |
| 7 | +This major release of the Optimizely SDK introduces APIs for Feature Management. It also introduces some breaking changes listed below. |
| 8 | + |
| 9 | +### New Features |
| 10 | +* Introduces the `isFeatureEnabled` API to determine whether to show a feature to a user or not. |
| 11 | +``` |
| 12 | +Boolean enabled = optimizelyClient.isFeatureEnabled("my_feature_key", "user_1", userAttributes); |
| 13 | +``` |
| 14 | + |
| 15 | +* 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: |
| 16 | +``` |
| 17 | +ArrayList<String> enabledFeatures = optimizelyClient.getEnabledFeatures("user_1", userAttributes); |
| 18 | +``` |
| 19 | + |
| 20 | +* Introduces Feature Variables to configure or parameterize your feature. There are four variable types: `Integer`, `String`, `Double`, `Boolean`. |
| 21 | +``` |
| 22 | +String stringVariable = optimizelyClient.getFeatureVariableString("my_feature_key", "string_variable_key", "user_1"); |
| 23 | +Integer integerVariable = optimizelyClient.getFeatureVariableInteger("my_feature_key", "integer_variable_key", "user_1"); |
| 24 | +Double doubleVariable = optimizelyClient.getFeatureVariableDouble("my_feature_key", "double_variable_key", "user_1"); |
| 25 | +Boolean booleanVariable = optimizelyClient.getFeatureVariableBoolean("my_feature_key", "boolean_variable_key", "user_1"); |
| 26 | +``` |
| 27 | + |
| 28 | +### Breaking changes |
| 29 | +* 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 is `revenue` and will be treated by Optimizely as the key for analyzing revenue data in results. |
| 30 | +``` |
| 31 | +Map<String, Object> eventTags = new HashMap<String, Object>(); |
| 32 | +
|
| 33 | +// reserved "revenue" tag |
| 34 | +eventTags.put("revenue", 6432); |
| 35 | +
|
| 36 | +optimizelyClient.track("event_key", "user_id", userAttributes, eventTags); |
| 37 | +``` |
| 38 | + |
| 39 | +* We have removed deprecated classes with the `NotificationBroadcaster` in favor of the new API with the `NotificationCenter`. 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 now `clearAllNotificationListeners()`) |
| 40 | + |
| 41 | +### Bug Fixes |
| 42 | +* Fix for the following issue: |
| 43 | +https://issuetracker.google.com/issues/63622293 |
| 44 | +Our github issue is [here](https://github.com/optimizely/android-sdk/issues/194). |
| 45 | +The JobWorkService was probably destroyed but we didn't cancel the |
| 46 | +processor. It causes an exception in dequeueWork in our JobWorkService. |
| 47 | +We wrapped the dequeueWork with a try/catch and are also now cancelling the background task in onDestroy. |
| 48 | + |
| 49 | +* Fix for possible error when loading logger via dagger (fall back logger provided). |
| 50 | + |
| 51 | +* Load UserProfileService on synchronous start. Also, cleanup UserProfileService cache in the background thread by removing experiments that are no longer in the datafile. |
| 52 | + |
3 | 53 | ## 1.6.1
|
4 | 54 | April 25, 2018
|
5 | 55 |
|
|
0 commit comments