Skip to content

Commit

Permalink
Merge pull request #31 from adjust/v4170
Browse files Browse the repository at this point in the history
Version 4.17.0
  • Loading branch information
uerceg authored Jan 18, 2019
2 parents bacf211 + 63213a1 commit 822318d
Show file tree
Hide file tree
Showing 109 changed files with 23,841 additions and 1,075 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
- [[email protected]][ios_sdk_v4.17.1]
- [[email protected]][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.
Expand Down Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
50 changes: 24 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
```

### <a id="sdk-project-settings"></a>Adjust project settings
Expand Down Expand Up @@ -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.** { *; }
```

Expand Down Expand Up @@ -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);
```

Expand Down Expand Up @@ -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].
### <a id="callback-id"></a>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);
```

### <a id="session-parameters"></a>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.
Expand Down Expand Up @@ -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");
}
Expand Down Expand Up @@ -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");
}
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.14.0
4.17.0
49 changes: 49 additions & 0 deletions dist/ADJAdjust2dx.h
Original file line number Diff line number Diff line change
@@ -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 <map>
#include <iostream>
#include "ADJEvent2dx.h"
#include "ADJConfig2dx.h"
#include "AdjustAttribution2dx.h"

extern const std::string ADJEnvironmentSandbox2dx;
extern const std::string ADJEnvironmentProduction2dx;

class ADJAdjust2dx {
public:
static void appDidLaunch(ADJConfig2dx adjustConfig);
static void trackEvent(ADJEvent2dx adjustEvent);
static void trackSubsessionStart();
static void trackSubsessionEnd();
static void setEnabled(bool isEnabled);
static void appWillOpenUrl(std::string url);
static void setDeviceToken(std::string deviceToken);
static void setOfflineMode(bool isOffline);
static void sendFirstPackages();
static void gdprForgetMe();
static void addSessionCallbackParameter(std::string key, std::string value);
static void addSessionPartnerParameter(std::string key, std::string value);
static void removeSessionCallbackParameter(std::string key);
static void removeSessionPartnerParameter(std::string key);
static void resetSessionCallbackParameters();
static void resetSessionPartnerParameters();
static bool isEnabled();
static std::string getIdfa();
static std::string getAdid();
static std::string getSdkVersion();
static AdjustAttribution2dx getAttribution();
// For testing purposes only.
static void setTestOptions(std::map<std::string, std::string> testOptionsMap);
static void teardown();
};

#endif /* _ADJUST_ADJUST2DX_H_ */
Loading

0 comments on commit 822318d

Please sign in to comment.