Skip to content

Commit

Permalink
Merge pull request #6 from AdevintaSpain/update-from-upstream
Browse files Browse the repository at this point in the history
Update from upstream
  • Loading branch information
Sloy authored Nov 12, 2019
2 parents f79924d + e98010e commit d5c2b6c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 2.5.1

##### Added
- Added support for `double` typed `Traits` values.

## 2.5.0

##### Breaking
- Updated to [Braze Android SDK 3.7.1](https://github.com/Appboy/appboy-android-sdk/blob/master/CHANGELOG.md#371).
- Removed the Feedback feature.

## 2.4.1

##### Fixed
Expand Down
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dependencies {

compileOnly 'com.segment.analytics.android:analytics:4.3.1'

api 'com.appboy:android-sdk-ui:3.3.0'
api 'com.appboy:android-sdk-ui:3.7.1'

testImplementation 'junit:junit:4.12'
testImplementation('org.robolectric:robolectric:3.0') {
Expand All @@ -74,7 +74,6 @@ dependencies {
testImplementation 'org.powermock:powermock-module-junit4-rule:1.6.2'
testImplementation 'org.powermock:powermock-api-mockito:1.6.2'
testImplementation 'org.powermock:powermock-classloading-xstream:1.6.2'
testImplementation files('libs/amazon-device-messaging-1.0.1.jar')

androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
Expand All @@ -83,7 +82,7 @@ dependencies {
androidTestImplementation 'junit:junit:4.12'
}

version = '2.4.1'
version = '2.5.1'

publishing {
publications {
Expand Down
Binary file removed libs/amazon-device-messaging-1.0.1.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ public void identify(IdentifyPayload identify) {
mAppboy.getCurrentUser().setCustomUserAttribute(key, (Boolean) value);
} else if (value instanceof Integer) {
mAppboy.getCurrentUser().setCustomUserAttribute(key, (Integer) value);
} else if (value instanceof Double) {
mAppboy.getCurrentUser().setCustomUserAttribute(key, (Double) value);
} else if (value instanceof Float) {
mAppboy.getCurrentUser().setCustomUserAttribute(key, (Float) value);
} else if (value instanceof Long) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public void testIdentifyFields() {
traits.putAvatar("avatarUrl");
traits.put("int", new Integer(10));
traits.put("bool", new Boolean(true));
traits.put("double", new Double(4.2));
traits.put("float", new Float(5.0));
traits.put("long", new Long(15L));
traits.put("string", "value");
Expand All @@ -170,6 +171,7 @@ public void testIdentifyFields() {
verify(mAppboyUser).setAvatarImageUrl("avatarUrl");
verify(mAppboyUser).setCustomUserAttribute("int", new Integer(10));
verify(mAppboyUser).setCustomUserAttribute("bool", new Boolean(true));
verify(mAppboyUser).setCustomUserAttribute("double", new Double(4.2));
verify(mAppboyUser).setCustomUserAttribute("float", new Float(5.0));
verify(mAppboyUser).setCustomUserAttribute("long", new Long(15L));
verify(mAppboyUser).setCustomUserAttribute("string", "value");
Expand Down

0 comments on commit d5c2b6c

Please sign in to comment.