Skip to content

Commit

Permalink
Merge pull request #135 from adjust/v4140
Browse files Browse the repository at this point in the history
Version 4.14.0
  • Loading branch information
uerceg authored Jun 8, 2018
2 parents 97d4184 + 3b44581 commit 80dd9c0
Show file tree
Hide file tree
Showing 32 changed files with 56 additions and 36 deletions.
8 changes: 4 additions & 4 deletions Assets/Adjust/Android/AdjustAndroid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace com.adjust.sdk
#if UNITY_ANDROID
public class AdjustAndroid
{
private const string sdkPrefix = "unity4.13.0";
private const string sdkPrefix = "unity4.14.0";
private static bool launchDeferredDeeplink = true;

private static AndroidJavaClass ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
Expand Down Expand Up @@ -337,9 +337,9 @@ public static void ResetSessionCallbackParameters()

public static void AppWillOpenUrl(string url)
{
AndroidJavaClass ajcUri = new AndroidJavaClass ("android.net.Uri");
AndroidJavaClass ajcUri = new AndroidJavaClass("android.net.Uri");
AndroidJavaObject ajoUri = ajcUri.CallStatic<AndroidJavaObject>("parse", url);
ajcAdjust.CallStatic("appWillOpenUrl", ajoUri);
ajcAdjust.CallStatic("appWillOpenUrl", ajoUri, ajoCurrentActivity);
}

// Android specific methods.
Expand Down Expand Up @@ -372,7 +372,7 @@ public static string GetAmazonAdId()
// Used for testing only.
public static void SetTestOptions(AdjustTestOptions testOptions)
{
AndroidJavaObject ajoTestOptions = testOptions.ToAndroidJavaObject (ajoCurrentActivity);
AndroidJavaObject ajoTestOptions = testOptions.ToAndroidJavaObject(ajoCurrentActivity);
ajcAdjust.CallStatic("setTestOptions", ajoTestOptions);
}

Expand Down
Binary file modified Assets/Adjust/Android/adjust-android.jar
Binary file not shown.
14 changes: 6 additions & 8 deletions Assets/Adjust/Test/AdjustTestOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class AdjustTestOptions
public bool? Teardown { get; set; }
public bool? DeleteState { get; set; }
public bool? UseTestConnectionOptions { get; set; }
public bool? NoBackoffWait { get; set; }

// Default value => Constants.ONE_MINUTE
public long? TimerIntervalInMilliseconds { get; set; }
Expand All @@ -33,52 +34,49 @@ public AndroidJavaObject ToAndroidJavaObject(AndroidJavaObject ajoCurrentActivit
{
ajoTestOptions.Set<String>("basePath", BasePath);
}

if (!string.IsNullOrEmpty(GdprPath))
{
ajoTestOptions.Set<String>("gdprPath", GdprPath);
}

if (DeleteState.GetValueOrDefault(false) && ajoCurrentActivity != null)
{
ajoTestOptions.Set<AndroidJavaObject>("context", ajoCurrentActivity);
}

if (UseTestConnectionOptions.HasValue)
{
AndroidJavaObject ajoUseTestConnectionOptions = new AndroidJavaObject("java.lang.Boolean", UseTestConnectionOptions.Value);
ajoTestOptions.Set<AndroidJavaObject>("useTestConnectionOptions", ajoUseTestConnectionOptions);
}

if (TimerIntervalInMilliseconds.HasValue)
{
AndroidJavaObject ajoTimerIntervalInMilliseconds = new AndroidJavaObject("java.lang.Long", TimerIntervalInMilliseconds.Value);
ajoTestOptions.Set<AndroidJavaObject>("timerIntervalInMilliseconds", ajoTimerIntervalInMilliseconds);
}

if (TimerStartInMilliseconds.HasValue)
{
AndroidJavaObject ajoTimerStartInMilliseconds = new AndroidJavaObject("java.lang.Long", TimerStartInMilliseconds.Value);
ajoTestOptions.Set<AndroidJavaObject>("timerStartInMilliseconds", ajoTimerStartInMilliseconds);
}

if (SessionIntervalInMilliseconds.HasValue)
{
AndroidJavaObject ajoSessionIntervalInMilliseconds = new AndroidJavaObject("java.lang.Long", SessionIntervalInMilliseconds.Value);
ajoTestOptions.Set<AndroidJavaObject>("sessionIntervalInMilliseconds", ajoSessionIntervalInMilliseconds);
}

if (SubsessionIntervalInMilliseconds.HasValue)
{
AndroidJavaObject ajoSubsessionIntervalInMilliseconds = new AndroidJavaObject("java.lang.Long", SubsessionIntervalInMilliseconds.Value);
ajoTestOptions.Set<AndroidJavaObject>("subsessionIntervalInMilliseconds", ajoSubsessionIntervalInMilliseconds);
}

if (Teardown.HasValue)
{
AndroidJavaObject ajoTeardown = new AndroidJavaObject("java.lang.Boolean", Teardown.Value);
ajoTestOptions.Set<AndroidJavaObject>("teardown", ajoTeardown);
}
if (NoBackoffWait.HasValue)
{
AndroidJavaObject ajoNoBackoffWait = new AndroidJavaObject("java.lang.Boolean", NoBackoffWait.Value);
ajoTestOptions.Set<AndroidJavaObject>("noBackoffWait", ajoNoBackoffWait);
}

return ajoTestOptions;
}
Expand Down
10 changes: 5 additions & 5 deletions Assets/Adjust/Test/CommandExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,31 +89,31 @@ private void TestOptions()
BasePath = _command.GetFirstParameterValue("basePath");
GdprPath = _command.GetFirstParameterValue("basePath");
}

if (_command.ContainsParameter("timerInterval"))
{
long timerInterval = long.Parse(_command.GetFirstParameterValue("timerInterval"));
testOptions.TimerIntervalInMilliseconds = timerInterval;
}

if (_command.ContainsParameter("timerStart"))
{
long timerStart = long.Parse(_command.GetFirstParameterValue("timerStart"));
testOptions.TimerStartInMilliseconds = timerStart;
}

if (_command.ContainsParameter("sessionInterval"))
{
long sessionInterval = long.Parse(_command.GetFirstParameterValue("sessionInterval"));
testOptions.SessionIntervalInMilliseconds = sessionInterval;
}

if (_command.ContainsParameter("subsessionInterval"))
{
long subsessionInterval = long.Parse(_command.GetFirstParameterValue("subsessionInterval"));
testOptions.SubsessionIntervalInMilliseconds = subsessionInterval;
}

if (_command.ContainsParameter("noBackoffWait"))
{
bool noBackoffWait = bool.Parse(_command.GetFirstParameterValue("noBackoffWait"));
testOptions.NoBackoffWait = noBackoffWait;
}
if (_command.ContainsParameter("teardown"))
{
List<string> teardownOptions = _command.Parameters["teardown"];
Expand Down
6 changes: 3 additions & 3 deletions Assets/Adjust/Test/TestApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ public class TestApp : MonoBehaviour
public static readonly string TAG = "[TestApp]";

#if (UNITY_WSA || UNITY_WP8)
public const string CLIENT_SDK = "unity4.13.0@wuap4.13.0";
public const string CLIENT_SDK = "unity4.14.0@wuap4.14.0";
private const string PORT = ":8080";
private const string PROTOCOL = "http://";
private const string BASE_URL = PROTOCOL + "localhost" + PORT; // Windows simulator
#elif UNITY_ANDROID
public const string CLIENT_SDK = "unity4.13.0@android4.13.0";
public const string CLIENT_SDK = "unity4.14.0@android4.14.0";
private const string PORT = ":8443";
private const string PROTOCOL = "https://";
private const string BASE_URL = PROTOCOL + "10.0.2.2" + PORT; // Android simulator
#elif UNITY_IOS
public const string CLIENT_SDK = "unity4.13.0@ios4.13.0";
public const string CLIENT_SDK = "unity4.14.0@ios4.14.0";
private const string PORT = ":8080";
private const string PROTOCOL = "http://";
private const string BASE_URL = PROTOCOL + "127.0.0.1" + PORT; // iOS simulator
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.13.0";
private const string sdkPrefix = "unity4.14.0";
private static bool appLaunched = false;

public static void Start(AdjustConfig adjustConfig)
Expand Down
Binary file modified Assets/Adjust/Windows/Stubs/TestLibraryInterface.dll
Binary file not shown.
Binary file modified Assets/Adjust/Windows/Stubs/Win10Interface.dll
Binary file not shown.
Binary file modified Assets/Adjust/Windows/Stubs/Win81Interface.dll
Binary file not shown.
Binary file modified Assets/Adjust/Windows/Stubs/WinWsInterface.dll
Binary file not shown.
Binary file modified Assets/Adjust/Windows/Test/TestLibrary.dll
Binary file not shown.
Binary file modified Assets/Adjust/Windows/Test/TestLibraryInterface.dll
Binary file not shown.
Binary file modified Assets/Adjust/Windows/W81/AdjustWP81.dll
Binary file not shown.
Binary file modified Assets/Adjust/Windows/W81/Win81Interface.dll
Binary file not shown.
Binary file modified Assets/Adjust/Windows/WS/AdjustWS.dll
Binary file not shown.
Binary file modified Assets/Adjust/Windows/WS/WinWsInterface.dll
Binary file not shown.
Binary file modified Assets/Adjust/Windows/WU10/AdjustUAP10.dll
Binary file not shown.
Binary file modified Assets/Adjust/Windows/WU10/Win10Interface.dll
Binary file not shown.
Binary file modified Assets/Adjust/Windows/WindowsPcl.dll
Binary file not shown.
Binary file modified Assets/Adjust/Windows/WindowsUap.dll
Binary file not shown.
3 changes: 2 additions & 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.13.0
// V4.14.0
// Created by Christian Wellenbrock (wellle) on 23rd July 2013.
// Copyright © 2012-2017 Adjust GmbH. All rights reserved.
//
Expand All @@ -23,6 +23,7 @@
@property (nonatomic, copy, nullable) NSNumber *subsessionIntervalInMilliseconds;
@property (nonatomic, assign) BOOL teardown;
@property (nonatomic, assign) BOOL deleteState;
@property (nonatomic, assign) BOOL noBackoffWait;

@end

Expand Down
Binary file modified Assets/Adjust/iOS/AdjustSdk.a
Binary file not shown.
Binary file modified Assets/Adjust/iOS/AdjustTestLibrary.a
Binary file not shown.
6 changes: 5 additions & 1 deletion Assets/Adjust/iOS/AdjustUnity.mm
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ void _AdjustSetTestOptions(const char* baseUrl,
long sessionIntervalInMilliseconds,
long subsessionIntervalInMilliseconds,
int teardown,
int deleteState) {
int deleteState,
int noBackoffWait) {
AdjustTestOptions *testOptions = [[AdjustTestOptions alloc] init];

NSString *stringBaseUrl = isStringValid(baseUrl) == true ? [NSString stringWithUTF8String:baseUrl] : nil;
Expand Down Expand Up @@ -430,6 +431,9 @@ void _AdjustSetTestOptions(const char* baseUrl,
if (deleteState != -1) {
[testOptions setDeleteState:(BOOL)deleteState];
}
if (noBackoffWait != -1) {
[testOptions setNoBackoffWait:(BOOL)noBackoffWait];
}

[Adjust setTestOptions:testOptions];
}
Expand Down
9 changes: 6 additions & 3 deletions Assets/Adjust/iOS/AdjustiOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace com.adjust.sdk
#if UNITY_IOS
public class AdjustiOS
{
private const string sdkPrefix = "unity4.13.0";
private const string sdkPrefix = "unity4.14.0";

[DllImport("__Internal")]
private static extern void _AdjustLaunchApp(
Expand Down Expand Up @@ -109,7 +109,8 @@ private static extern void _AdjustSetTestOptions(
long sessionIntervalInMilliseconds,
long subsessionIntervalInMilliseconds,
int teardown,
int deleteState);
int deleteState,
int noBackoffWait);

[DllImport("__Internal")]
private static extern void _AdjustTrackSubsessionStart();
Expand Down Expand Up @@ -287,6 +288,7 @@ public static void SetTestOptions(AdjustTestOptions testOptions)
long subsessionIntMls = testOptions.SubsessionIntervalInMilliseconds.HasValue ? testOptions.SubsessionIntervalInMilliseconds.Value : -1;
bool teardown = testOptions.Teardown.HasValue ? testOptions.Teardown.Value : false;
bool deleteState = testOptions.DeleteState.HasValue ? testOptions.DeleteState.Value : false;
bool noBackoffWait = testOptions.NoBackoffWait.HasValue ? testOptions.NoBackoffWait.Value : false;

_AdjustSetTestOptions(
testOptions.BaseUrl,
Expand All @@ -298,7 +300,8 @@ public static void SetTestOptions(AdjustTestOptions testOptions)
sessionIntMls,
subsessionIntMls,
AdjustUtils.ConvertBool(teardown),
AdjustUtils.ConvertBool(deleteState));
AdjustUtils.ConvertBool(deleteState),
AdjustUtils.ConvertBool(noBackoffWait));
}

public static void TrackSubsessionStart()
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
### Version 4.14.0 (8th June 2018)
#### Added
- Added deep link caching in case `appWillOpenUrl`/`AppWillOpenUrl` method is called natively before SDK is initialised.

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

---

### Version 4.13.0 (15th May 2018)
#### Added
- Added `Adjust.gdprForgetMe()` method to enable possibility for user to be forgotten in accordance with GDPR law.
Expand Down Expand Up @@ -484,6 +495,7 @@
[ios_sdk_v4.12.2]: https://github.com/adjust/ios_sdk/tree/v4.12.2
[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.0]: https://github.com/adjust/ios_sdk/tree/v4.14.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 @@ -500,6 +512,8 @@
[android_sdk_v4.12.1]: https://github.com/adjust/android_sdk/tree/v4.12.1
[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

[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
[windows_sdk_v4.14.0]: https://github.com/adjust/windows_sdk/tree/v4.14.0
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.13.0
4.14.0
4 changes: 2 additions & 2 deletions doc/migrate.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Migrate your Adjust SDK for Unity3d to 4.13.0 from 3.4.4
## Migrate your Adjust SDK for Unity3d to 4.14.0 from 3.4.4

### Migration procedure

Expand All @@ -9,7 +9,7 @@ keeping in `Assets/Plugins` folder.

For migration purposes, we have prepared the Adjust SDK uninstall script written in Python (`adjust_uninstall.py`).

Migration to version 4.13.0 of our SDK requires the following steps:
Migration to version 4.14.0 of our SDK requires the following steps:

1. Copy the `adjust_uninstall.py` script to your root Unity project directory and run it. This script should
delete all adjust source files from the previous SDK version you had.
Expand Down
2 changes: 1 addition & 1 deletion ext/Android/sdk
Submodule sdk updated 41 files
+1 −1 Adjust/adjust/build.gradle
+26 −0 Adjust/adjust/src/main/java/com/adjust/sdk/ActivityHandler.java
+15 −1 Adjust/adjust/src/main/java/com/adjust/sdk/Adjust.java
+21 −0 Adjust/adjust/src/main/java/com/adjust/sdk/AdjustInstance.java
+1 −0 Adjust/adjust/src/main/java/com/adjust/sdk/AdjustTestOptions.java
+1 −1 Adjust/adjust/src/main/java/com/adjust/sdk/Constants.java
+52 −0 Adjust/adjust/src/main/java/com/adjust/sdk/SharedPreferencesManager.java
+31 −0 Adjust/example-tv/build.gradle
+17 −0 Adjust/example-tv/proguard-rules.pro
+13 −0 Adjust/example-tv/src/androidTest/java/com/adjust/examples/ApplicationTest.java
+46 −0 Adjust/example-tv/src/main/AndroidManifest.xml
+176 −0 Adjust/example-tv/src/main/java/com/adjust/examples/GlobalApplication.java
+113 −0 Adjust/example-tv/src/main/java/com/adjust/examples/MainActivity.java
+117 −0 Adjust/example-tv/src/main/res/layout/activity_main.xml
+ Adjust/example-tv/src/main/res/mipmap-hdpi/ic_launcher.png
+ Adjust/example-tv/src/main/res/mipmap-mdpi/ic_launcher.png
+ Adjust/example-tv/src/main/res/mipmap-xhdpi/ic_launcher.png
+ Adjust/example-tv/src/main/res/mipmap-xxhdpi/ic_launcher.png
+6 −0 Adjust/example-tv/src/main/res/values-w820dp/dimens.xml
+5 −0 Adjust/example-tv/src/main/res/values/dimens.xml
+19 −0 Adjust/example-tv/src/main/res/values/strings.xml
+5 −0 Adjust/example-tv/src/main/res/values/styles.xml
+1 −1 Adjust/example/build.gradle
+1 −1 Adjust/example/src/main/java/com/adjust/examples/MainActivity.java
+1 −1 Adjust/example/src/main/java/com/adjust/examples/ServiceActivity.java
+1 −1 Adjust/pom.xml
+1 −1 Adjust/pom_criteo.xml
+1 −1 Adjust/pom_sociomantic.xml
+1 −1 Adjust/pom_trademob.xml
+1 −1 Adjust/settings.gradle
+1 −1 Adjust/test/src/androidTest/java/com/adjust/sdk/TestActivityPackage.java
+8 −1 Adjust/testapp/src/main/java/com/adjust/testapp/AdjustCommandExecutor.java
+2 −2 Adjust/testapp/src/main/java/com/adjust/testapp/MainActivity.java
+10 −1 CHANGELOG.md
+12 −9 README.md
+1 −1 VERSION
+0 −184 checkstyle/adjust_checks.xml
+1 −1 doc/english/criteo_plugin.md
+1 −1 doc/english/migrate.md
+1 −1 doc/english/sociomantic_plugin.md
+1 −1 doc/english/trademob_plugin.md
8 changes: 4 additions & 4 deletions ext/Windows/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ ECHO f | xcopy /f /y bridge\release\WindowsPcl.dll ..\..\Assets\Adjust\Windows\W
ECHO f | xcopy /f /y bridge\release\WindowsUap.dll ..\..\Assets\Adjust\Windows\WindowsUap.dll

REM ------------- STUBS
ECHO f | xcopy /f /y bridge\release\stubs\Win10Interface.dll ..\..\Assets\Adjust\Windows\stubs\Win10Interface.dll
ECHO f | xcopy /f /y bridge\release\stubs\Win81Interface.dll ..\..\Assets\Adjust\Windows\stubs\Win81Interface.dll
ECHO f | xcopy /f /y bridge\release\stubs\WinWsInterface.dll ..\..\Assets\Adjust\Windows\stubs\WinWsInterface.dll
ECHO f | xcopy /f /y bridge\release\stubs\TestLibraryInterface.dll ..\..\Assets\Adjust\Windows\stubs\TestLibraryInterface.dll
ECHO f | xcopy /f /y bridge\release\stubs\Win10Interface.dll ..\..\Assets\Adjust\Windows\Stubs\Win10Interface.dll
ECHO f | xcopy /f /y bridge\release\stubs\Win81Interface.dll ..\..\Assets\Adjust\Windows\Stubs\Win81Interface.dll
ECHO f | xcopy /f /y bridge\release\stubs\WinWsInterface.dll ..\..\Assets\Adjust\Windows\Stubs\WinWsInterface.dll
ECHO f | xcopy /f /y bridge\release\stubs\TestLibraryInterface.dll ..\..\Assets\Adjust\Windows\Stubs\TestLibraryInterface.dll

REM ------------- WU10
ECHO f | xcopy /f /y bridge\release\Win10Interface.dll ..\..\Assets\Adjust\Windows\WU10\Win10Interface.dll
Expand Down
2 changes: 1 addition & 1 deletion ext/iOS/sdk

0 comments on commit 80dd9c0

Please sign in to comment.