diff --git a/CHANGELOG.md b/CHANGELOG.md
index 90c7eb20..a8c2c9cf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,20 @@
+### Version 4.17.0 (18th January 2019)
+#### Added
+- Added `getSdkVersion` method to `Adjust2dx` interface to obtain current SDK version string.
+- Added `setCallbackId` method on `AdjustEvent2dx` object for users to set custom ID on event object which will later be reported in event success/failure callbacks.
+- Added `callbackId` field to event tracking success callback object.
+- Added `callbackId` field to event tracking failure callback object.
+
+#### Changed
+- Marked `setReadMobileEquipmentIdentity` method of `AdjustConfig2dx` object as deprecated.
+- SDK will now fire attribution request each time upon session tracking finished in case it lacks attribution info.
+
+#### Native SDKs
+- [iOS@v4.17.1][ios_sdk_v4.17.1]
+- [Android@v4.17.0][android_sdk_v4.17.0]
+
+---
+
### Version 4.14.0 (9th July 2018)
#### Added
- Added deep link caching in case `appWillOpenUrl` method is called before SDK is initialised.
@@ -250,6 +267,7 @@
[ios_sdk_v4.12.3]: https://github.com/adjust/ios_sdk/tree/v4.12.3
[ios_sdk_v4.13.0]: https://github.com/adjust/ios_sdk/tree/v4.13.0
[ios_sdk_v4.14.1]: https://github.com/adjust/ios_sdk/tree/v4.14.1
+[ios_sdk_v4.17.1]: https://github.com/adjust/ios_sdk/tree/v4.17.1
[android_sdk_v4.0.8]: https://github.com/adjust/android_sdk/tree/v4.0.8
[android_sdk_v4.1.0]: https://github.com/adjust/android_sdk/tree/v4.1.0
@@ -265,5 +283,6 @@
[android_sdk_v4.12.4]: https://github.com/adjust/android_sdk/tree/v4.12.4
[android_sdk_v4.13.0]: https://github.com/adjust/android_sdk/tree/v4.13.0
[android_sdk_v4.14.0]: https://github.com/adjust/android_sdk/tree/v4.14.0
+[android_sdk_v4.17.0]: https://github.com/adjust/android_sdk/tree/v4.17.0
[windows_sdk_v4.0.3]: https://github.com/adjust/windows_sdk/tree/v4.0.3
diff --git a/LICENSE b/LICENSE
index 0ed18fd8..89add576 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2012-2018 adjust GmbH
+Copyright (c) 2012-2019 adjust GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index aea6d557..4f442ec6 100644
--- a/README.md
+++ b/README.md
@@ -27,6 +27,7 @@ This is the Cocos2d-x SDK of Adjust™. You can read more about Adjust™ at [Ad
* [Revenue deduplication](#revenue-deduplication)
* [Callback parameters](#callback-parameters)
* [Partner parameters](#partner-parameters)
+ * [Callback identifier](#callback-id)
* [Session parameters](#session-parameters)
* [Session callback parameters](#session-callback-parameters)
* [Session partner parameters](#session-partner-parameters)
@@ -69,15 +70,15 @@ Take the C++ source files from the `src` folder and add them to your Cocos2d-x p
Inside Android Studio project, you need to add the paths of the Adjust C++ files to the `LOCAL_SRC_FILES` section in your `Android.mk` file:
```mk
-../../../Classes/Adjust/AdjustConfig2dx.cpp \
-../../../Classes/Adjust/AdjustAttribution2dx.cpp \
-../../../Classes/Adjust/AdjustProxy2dx.cpp \
-../../../Classes/Adjust/AdjustEvent2dx.cpp \
-../../../Classes/Adjust/Adjust2dx.cpp \
-../../../Classes/Adjust/AdjustEventFailure2dx.cpp \
-../../../Classes/Adjust/AdjustEventSuccess2dx.cpp \
-../../../Classes/Adjust/AdjustSessionFailure2dx.cpp \
-../../../Classes/Adjust/AdjustSessionSuccess2dx.cpp
+$(LOCAL_PATH)/../../../Classes/Adjust/AdjustConfig2dx.cpp \
+$(LOCAL_PATH)/../../../Classes/Adjust/AdjustAttribution2dx.cpp \
+$(LOCAL_PATH)/../../../Classes/Adjust/AdjustProxy2dx.cpp \
+$(LOCAL_PATH)/../../../Classes/Adjust/AdjustEvent2dx.cpp \
+$(LOCAL_PATH)/../../../Classes/Adjust/Adjust2dx.cpp \
+$(LOCAL_PATH)/../../../Classes/Adjust/AdjustEventFailure2dx.cpp \
+$(LOCAL_PATH)/../../../Classes/Adjust/AdjustEventSuccess2dx.cpp \
+$(LOCAL_PATH)/../../../Classes/Adjust/AdjustSessionFailure2dx.cpp \
+$(LOCAL_PATH)/../../../Classes/Adjust/AdjustSessionSuccess2dx.cpp
```
### Adjust project settings
@@ -148,20 +149,6 @@ If you are using Proguard, add these lines to your Proguard file:
java.lang.String getId();
boolean isLimitAdTrackingEnabled();
}
--keep class dalvik.system.VMRuntime {
- java.lang.String getRuntime();
-}
--keep class android.os.Build {
- java.lang.String[] SUPPORTED_ABIS;
- java.lang.String CPU_ABI;
-}
--keep class android.content.res.Configuration {
- android.os.LocaleList getLocales();
- java.util.Locale locale;
-}
--keep class android.os.LocaleList {
- java.util.Locale get(int);
-}
-keep public class com.android.installreferrer.** { *; }
```
@@ -363,10 +350,8 @@ For example, suppose you have registered the URL `http://www.adjust.com/callback
```cpp
AdjustEvent2dx adjustEvent = AdjustEvent2dx("abc123");
-
adjustEvent.addCallbackParameter("key", "value");
adjustEvent.addCallbackParameter("foo", "bar");
-
Adjust2dx::trackEvent(adjustEvent);
```
@@ -395,6 +380,16 @@ Adjust2dx::trackEvent(adjustEvent);
You can read more about special partners and how to integrate them in our [guide to special partners][special-partners].
+### Callback identifier
+
+You can also add custom string identifier to each event you want to track. This identifier will later be reported in event success and/or event failure callbacks to enable you to keep track on which event was successfully tracked or not. You can set this identifier by calling the `setCallbackId` method on your `AdjustEvent2dx` instance:
+
+```cpp
+AdjustEvent2dx adjustEvent = AdjustEvent2dx("abc123");
+adjustEvent.setCallbackId("Your-Custom-Id");
+Adjust2dx::trackEvent(adjustEvent);
+```
+
### Session parameters
Some parameters are saved to be sent in every event and session of the Adjust SDK. Once you have added any of these parameters, you don't need to add them again, since they will be saved locally. If you add the same parameter twice, there will be no effect.
@@ -534,6 +529,7 @@ static void eventSuccessCallbackMethod(AdjustEventSuccess2dx eventSuccess) {
CCLOG("\nMessage: %s", eventSuccess.getMessage().c_str());
CCLOG("\nTimestamp: %s", eventSuccess.getTimestamp().c_str());
CCLOG("\nEvent token: %s", eventSuccess.getEventToken().c_str());
+ CCLOG("\Callback ID: %s", eventSuccess.getCallbackId().c_str());
CCLOG("\nJSON response: %s", eventSuccess.getJsonResponse().c_str());
CCLOG("\n");
}
@@ -568,6 +564,7 @@ static void eventFailureCallbackMethod(AdjustEventFailure2dx eventFailure) {
CCLOG("\nTimestamp: %s", eventFailure.getTimestamp().c_str());
CCLOG("\nWill retry: %s", eventFailure.getWillRetry().c_str());
CCLOG("\nEvent token: %s", eventFailure.getEventToken().c_str());
+ CCLOG("\Callback ID: %s", eventFailure.getCallbackId().c_str());
CCLOG("\nJSON response: %s", eventFailure.getJsonResponse().c_str());
CCLOG("\n");
}
@@ -660,6 +657,7 @@ The callback functions will be called after the SDK tries to send a package to t
Both event response data objects contain:
- `std::string eventToken` the event token, if the package tracked was an event.
+- `std::string callbackId` the custom defined callback ID set on event object.
And both event- and session-failed objects also contain:
@@ -935,7 +933,7 @@ To set up your Android app to handle deep linking at a native level, please foll
The Adjust SDK is licensed under the MIT License.
-Copyright (c) 2012-2018 Adjust GmbH, http://www.adjust.com
+Copyright (c) 2012-2019 Adjust GmbH, http://www.adjust.com
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
diff --git a/VERSION b/VERSION
index c412a4e2..43b58271 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.14.0
+4.17.0
diff --git a/dist/ADJAdjust2dx.h b/dist/ADJAdjust2dx.h
new file mode 100755
index 00000000..cd0fc4d2
--- /dev/null
+++ b/dist/ADJAdjust2dx.h
@@ -0,0 +1,49 @@
+//
+// ADJAdjust2dx.h
+// Adjust SDK
+//
+// Created by Uglješa Erceg (@uerceg) on 17th June 2015.
+// Copyright © 2015-2019 Adjust GmbH. All rights reserved.
+//
+
+#ifndef _ADJUST_ADJUST2DX_H_
+#define _ADJUST_ADJUST2DX_H_
+
+#include