Skip to content

Commit

Permalink
Merge pull request #164 from adjust/v4200
Browse files Browse the repository at this point in the history
Version 4.20.0
  • Loading branch information
uerceg authored Jan 16, 2020
2 parents 83e0547 + f21b52e commit cf101ea
Show file tree
Hide file tree
Showing 18 changed files with 50 additions and 8 deletions.
8 changes: 7 additions & 1 deletion Assets/Adjust/Android/AdjustAndroid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace com.adjust.sdk
#if UNITY_ANDROID
public class AdjustAndroid
{
private const string sdkPrefix = "unity4.19.2";
private const string sdkPrefix = "unity4.20.0";
private static bool launchDeferredDeeplink = true;
private static AndroidJavaClass ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
private static AndroidJavaObject ajoCurrentActivity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity");
Expand Down Expand Up @@ -104,6 +104,12 @@ public static void Start(AdjustConfig adjustConfig)
ajoAdjustConfig.Call("setDefaultTracker", adjustConfig.defaultTracker);
}

// Check if user has set external device identifier.
if (adjustConfig.externalDeviceId != null)
{
ajoAdjustConfig.Call("setExternalDeviceId", adjustConfig.externalDeviceId);
}

// Check if user has set app secret.
if (IsAppSecretSet(adjustConfig))
{
Expand Down
Binary file modified Assets/Adjust/Android/adjust-android.jar
Binary file not shown.
Empty file modified Assets/Adjust/Test/3rdParty/JsonNet-Lite.unitypackage.json
100755 → 100644
Empty file.
Empty file modified Assets/Adjust/Test/3rdParty/JsonNet-Lite/Newtonsoft.Json.dll
100755 → 100644
Empty file.
Empty file.
5 changes: 5 additions & 0 deletions Assets/Adjust/Test/CommandExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ private void Config()
adjustConfig.setDefaultTracker(_command.GetFirstParameterValue("defaultTracker"));
}

if (_command.ContainsParameter("externalDeviceId"))
{
adjustConfig.setExternalDeviceId(_command.GetFirstParameterValue("externalDeviceId"));
}

if (_command.ContainsParameter("delayStart"))
{
var delayStartStr = _command.GetFirstParameterValue("delayStart");
Expand Down
6 changes: 6 additions & 0 deletions Assets/Adjust/Unity/AdjustConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class AdjustConfig
internal string sceneName;
internal string userAgent;
internal string defaultTracker;
internal string externalDeviceId;
internal long? info1;
internal long? info2;
internal long? info3;
Expand Down Expand Up @@ -63,6 +64,11 @@ public void setDefaultTracker(string defaultTracker)
this.defaultTracker = defaultTracker;
}

public void setExternalDeviceId(string externalDeviceId)
{
this.externalDeviceId = externalDeviceId;
}

public void setLaunchDeferredDeeplink(bool launchDeferredDeeplink)
{
this.launchDeferredDeeplink = launchDeferredDeeplink;
Expand Down
2 changes: 1 addition & 1 deletion Assets/Adjust/Windows/AdjustWindows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace com.adjust.sdk
{
public class AdjustWindows
{
private const string sdkPrefix = "unity4.19.2";
private const string sdkPrefix = "unity4.20.0";
private static bool appLaunched = false;

public static void Start(AdjustConfig adjustConfig)
Expand Down
2 changes: 2 additions & 0 deletions Assets/Adjust/iOS/ADJConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@
*/
@property (nonatomic, copy, nullable) NSString *defaultTracker;

@property (nonatomic, copy, nullable) NSString *externalDeviceId;

/**
* @brief Adjust app token.
*/
Expand Down
2 changes: 1 addition & 1 deletion Assets/Adjust/iOS/Adjust.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Adjust.h
// Adjust
//
// V4.19.0
// V4.20.0
// Created by Christian Wellenbrock (wellle) on 23rd July 2013.
// Copyright © 2012-2017 Adjust GmbH. All rights reserved.
//
Expand Down
Binary file modified Assets/Adjust/iOS/AdjustSdk.a
Binary file not shown.
7 changes: 7 additions & 0 deletions Assets/Adjust/iOS/AdjustUnity.mm
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ void _AdjustLaunchApp(const char* appToken,
const char* sdkPrefix,
const char* userAgent,
const char* defaultTracker,
const char* externalDeviceId,
const char* sceneName,
int allowSuppressLogLevel,
int logLevel,
Expand All @@ -107,6 +108,7 @@ void _AdjustLaunchApp(const char* appToken,
NSString *stringSdkPrefix = isStringValid(sdkPrefix) == true ? [NSString stringWithUTF8String:sdkPrefix] : nil;
NSString *stringUserAgent = isStringValid(userAgent) == true ? [NSString stringWithUTF8String:userAgent] : nil;
NSString *stringDefaultTracker = isStringValid(defaultTracker) == true ? [NSString stringWithUTF8String:defaultTracker] : nil;
NSString *stringExternalDeviceId = isStringValid(externalDeviceId) == true ? [NSString stringWithUTF8String:externalDeviceId] : nil;
NSString *stringSceneName = isStringValid(sceneName) == true ? [NSString stringWithUTF8String:sceneName] : nil;

ADJConfig *adjustConfig;
Expand Down Expand Up @@ -176,6 +178,11 @@ void _AdjustLaunchApp(const char* appToken,
[adjustConfig setDefaultTracker:stringDefaultTracker];
}

// External device identifier.
if (externalDeviceId != nil) {
[adjustConfig setExternalDeviceId:stringExternalDeviceId];
}

// App secret.
if (secretId != -1 && info1 != -1 && info2 != -1 && info3 != -1 && info4 != 1) {
[adjustConfig setAppSecret:secretId info1:info1 info2:info2 info3:info3 info4:info4];
Expand Down
5 changes: 4 additions & 1 deletion Assets/Adjust/iOS/AdjustiOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace com.adjust.sdk
#if UNITY_IOS
public class AdjustiOS
{
private const string sdkPrefix = "unity4.19.2";
private const string sdkPrefix = "unity4.20.0";

[DllImport("__Internal")]
private static extern void _AdjustLaunchApp(
Expand All @@ -17,6 +17,7 @@ private static extern void _AdjustLaunchApp(
string sdkPrefix,
string userAgent,
string defaultTracker,
string extenralDeviceId,
string sceneName,
int allowSuppressLogLevel,
int logLevel,
Expand Down Expand Up @@ -135,6 +136,7 @@ public static void Start(AdjustConfig adjustConfig)
string sceneName = adjustConfig.sceneName != null ? adjustConfig.sceneName : "ADJ_INVALID";
string userAgent = adjustConfig.userAgent != null ? adjustConfig.userAgent : "ADJ_INVALID";
string defaultTracker = adjustConfig.defaultTracker != null ? adjustConfig.defaultTracker : "ADJ_INVALID";
string externalDeviceId = adjustConfig.externalDeviceId != null ? adjustConfig.externalDeviceId : "ADJ_INVALID";
string environment = adjustConfig.environment.ToLowercaseString();
long info1 = AdjustUtils.ConvertLong(adjustConfig.info1);
long info2 = AdjustUtils.ConvertLong(adjustConfig.info2);
Expand All @@ -161,6 +163,7 @@ public static void Start(AdjustConfig adjustConfig)
sdkPrefix,
userAgent,
defaultTracker,
externalDeviceId,
sceneName,
allowSuppressLogLevel,
logLevel,
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
### Version 4.20.0 (16th January 2020)
#### Added
- Added external device ID support.

#### Native SDKs
- [[email protected]][ios_sdk_v4.20.0]
- [[email protected]][android_sdk_v4.20.0]
- [[email protected]][windows_sdk_v4.17.0]

---

### Version 4.19.2 (14th January 2020)
#### Added
- Added Adjust SDK to Unity Asset Store. As of this version, you can add Adjust SDK from [Unity Asset Store](https://assetstore.unity.com/packages/tools/utilities/adjust-sdk-160890) as well.
Expand Down Expand Up @@ -642,6 +653,7 @@
[ios_sdk_v4.18.0]: https://github.com/adjust/ios_sdk/tree/v4.18.0
[ios_sdk_v4.18.3]: https://github.com/adjust/ios_sdk/tree/v4.18.3
[ios_sdk_v4.19.0]: https://github.com/adjust/ios_sdk/tree/v4.19.0
[ios_sdk_v4.20.0]: https://github.com/adjust/ios_sdk/tree/v4.20.0

[android_sdk_v3.5.0]: https://github.com/adjust/android_sdk/tree/v3.5.0
[android_sdk_v4.1.0]: https://github.com/adjust/android_sdk/tree/v4.1.0
Expand All @@ -665,6 +677,7 @@
[android_sdk_v4.18.2]: https://github.com/adjust/android_sdk/tree/v4.18.2
[android_sdk_v4.19.0]: https://github.com/adjust/android_sdk/tree/v4.19.0
[android_sdk_v4.19.1]: https://github.com/adjust/android_sdk/tree/v4.19.1
[android_sdk_v4.20.0]: https://github.com/adjust/android_sdk/tree/v4.20.0

[windows_sdk_v4.12.0]: https://github.com/adjust/windows_sdk/tree/v4.12.0
[windows_sdk_v4.13.0]: https://github.com/adjust/windows_sdk/tree/v4.13.0
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.19.2
4.20.0
2 changes: 1 addition & 1 deletion doc/english/migration/migrate.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Migrate your Adjust SDK for Unity3d to 4.19.2 from 3.4.4
## Migrate your Adjust SDK for Unity3d to 4.20.0 from 3.4.4

### Migration procedure

Expand Down
2 changes: 1 addition & 1 deletion ext/android/sdk
Submodule sdk updated 67 files
+4 −4 Adjust/build.gradle
+7 −8 Adjust/example-app-fbpixel/build.gradle
+0 −26 Adjust/example-app-fbpixel/src/androidTest/java/com/adjust/examples/ExampleInstrumentedTest.java
+2 −3 Adjust/example-app-fbpixel/src/main/java/com/adjust/examples/MainActivity.java
+2 −3 Adjust/example-app-fbpixel/src/main/res/layout/activity_main.xml
+0 −17 Adjust/example-app-fbpixel/src/test/java/com/adjust/examples/ExampleUnitTest.java
+7 −16 Adjust/example-app-java/build.gradle
+0 −13 Adjust/example-app-java/src/androidTest/java/com/adjust/examples/ApplicationTest.java
+1 −1 Adjust/example-app-java/src/main/AndroidManifest.xml
+1 −18 Adjust/example-app-java/src/main/java/com/adjust/examples/GlobalApplication.java
+13 −11 Adjust/example-app-java/src/main/java/com/adjust/examples/MainActivity.java
+3 −1 Adjust/example-app-java/src/main/java/com/adjust/examples/ServiceActivity.java
+2 −2 Adjust/example-app-java/src/main/java/com/adjust/examples/ServiceExample.java
+9 −14 Adjust/example-app-kotlin/build.gradle
+0 −24 Adjust/example-app-kotlin/src/androidTest/java/com/adjust/examples/ExampleInstrumentedTest.kt
+1 −2 Adjust/example-app-kotlin/src/main/java/com/adjust/examples/MainActivity.kt
+1 −2 Adjust/example-app-kotlin/src/main/java/com/adjust/examples/ServiceActivity.kt
+0 −17 Adjust/example-app-kotlin/src/test/java/com/adjust/examples/ExampleUnitTest.kt
+7 −6 Adjust/example-app-tv/build.gradle
+0 −13 Adjust/example-app-tv/src/androidTest/java/com/adjust/examples/ApplicationTest.java
+1 −1 Adjust/example-app-tv/src/main/AndroidManifest.xml
+10 −5 Adjust/example-app-tv/src/main/java/com/adjust/examples/GlobalApplication.java
+13 −11 Adjust/example-app-tv/src/main/java/com/adjust/examples/MainActivity.java
+1 −2 Adjust/example-app-tv/src/main/res/values/styles.xml
+8 −9 Adjust/example-app-webbridge/build.gradle
+0 −26 Adjust/example-app-webbridge/src/androidTest/java/com/example/examples/ExampleInstrumentedTest.java
+3 −3 Adjust/example-app-webbridge/src/main/java/com/example/examples/MainActivity.java
+2 −3 Adjust/example-app-webbridge/src/main/res/layout/activity_main.xml
+0 −17 Adjust/example-app-webbridge/src/test/java/com/example/examples/ExampleUnitTest.java
+2 −0 Adjust/gradle.properties
+1 −1 Adjust/sdk-core/src/main/java/com/adjust/sdk/Adjust.java
+5 −0 Adjust/sdk-core/src/main/java/com/adjust/sdk/AdjustConfig.java
+1 −1 Adjust/sdk-core/src/main/java/com/adjust/sdk/Constants.java
+8 −0 Adjust/sdk-core/src/main/java/com/adjust/sdk/PackageBuilder.java
+1 −1 Adjust/sdk-plugin-criteo/build.gradle
+1 −1 Adjust/sdk-plugin-imei/build.gradle
+1 −1 Adjust/sdk-plugin-oaid/build.gradle
+5 −5 Adjust/sdk-plugin-play/build.gradle
+1 −1 Adjust/sdk-plugin-sociomantic/build.gradle
+1 −1 Adjust/sdk-plugin-trademob/build.gradle
+1 −1 Adjust/sdk-plugin-webbridge/build.gradle
+1 −1 Adjust/sdk-plugin-webbridge/src/main/assets/adjust.js
+5 −0 Adjust/sdk-plugin-webbridge/src/main/assets/adjust_config.js
+8 −1 Adjust/sdk-plugin-webbridge/src/main/java/com/adjust/sdk/webbridge/AdjustBridgeInstance.java
+9 −6 Adjust/test-app-core/build.gradle
+5 −0 Adjust/test-app-core/src/main/java/com/adjust/testapp/AdjustCommandExecutor.java
+2 −1 Adjust/test-app-core/src/main/java/com/adjust/testapp/MainActivity.java
+5 −4 Adjust/test-app-webbridge/build.gradle
+5 −0 Adjust/test-app-webbridge/src/main/assets/command_executor.js
+3 −1 Adjust/test-app-webbridge/src/main/java/com/example/testappwebbridge/MainActivity.java
+2 −3 Adjust/test-app-webbridge/src/main/res/layout/activity_main.xml
+6 −8 Adjust/test-kotlin/build.gradle
+2 −2 Adjust/test-library/build.gradle
+10 −8 Adjust/test-unit/build.gradle
+1 −1 Adjust/test-unit/src/androidTest/java/com/adjust/sdk/TestActivityPackage.java
+8 −0 CHANGELOG.md
+4 −2 README.md
+1 −1 VERSION
+2 −2 doc/chinese/README.md
+2 −2 doc/chinese/plugins/oaid.md
+1 −1 doc/english/migration/migrate.md
+3 −3 doc/english/plugins/oaid.md
+2 −2 doc/japanese/README.md
+1 −1 doc/japanese/migration/migrate.md
+2 −2 doc/japanese/plugins/oaid.md
+2 −2 doc/korean/README.md
+2 −2 doc/korean/plugins/oaid.md

0 comments on commit cf101ea

Please sign in to comment.