Skip to content

Commit 7244ef1

Browse files
update for 2.0.0 release (#192)
* update for 2.0.0 release * add bug fix for JobWorkService * add license header * add other bug fixes to release 2.0.0 changelog * add github issue and fix date * use optimizely java sdk 2.0.1
1 parent 06e8ef0 commit 7244ef1

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

CHANGELOG.md

+50
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,55 @@
11
# Optimizely Android X SDK Changelog
22

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+
353
## 1.6.1
454
April 25, 2018
555

android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyLiteLogger.java

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/****************************************************************************
2+
* Copyright 2017-2018, Optimizely, Inc. and contributors *
3+
* *
4+
* Licensed under the Apache License, Version 2.0 (the "License"); *
5+
* you may not use this file except in compliance with the License. *
6+
* You may obtain a copy of the License at *
7+
* *
8+
* http://www.apache.org/licenses/LICENSE-2.0 *
9+
* *
10+
* Unless required by applicable law or agreed to in writing, software *
11+
* distributed under the License is distributed on an "AS IS" BASIS, *
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13+
* See the License for the specific language governing permissions and *
14+
* limitations under the License. *
15+
***************************************************************************/
16+
117
package com.optimizely.ab.android.sdk;
218

319
import android.util.Log;

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ ext {
5353
build_tools_version = "27.0.0"
5454
min_sdk_version = 10
5555
target_sdk_version = 26
56-
java_core_ver = "2.0.0-beta8"
56+
java_core_ver = "2.0.1"
5757
android_logger_ver = "1.3.6"
5858
support_annotations_ver = "24.2.1"
5959
junit_ver = "4.12"

0 commit comments

Comments
 (0)