Skip to content

Commit d3af821

Browse files
authored
Merge pull request #100 from adjust/v4111
Version 4.11.1
2 parents a2e402e + edae433 commit d3af821

File tree

170 files changed

+10766
-424
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+10766
-424
lines changed

Assets/Adjust.meta

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Adjust/Adjust.cs

+17
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,23 @@ public static void getGoogleAdId(Action<string> onDeviceIdsRead) {
312312
#endregion
313313

314314
#region Attribution callback
315+
316+
public static void runAttributionChangedDictionary(Dictionary<string, string> dicAttributionData)
317+
{
318+
if (instance == null)
319+
{
320+
Debug.Log(Adjust.errorMessage);
321+
return;
322+
}
323+
if (Adjust.attributionChangedDelegate == null)
324+
{
325+
Debug.Log("adjust: Attribution changed delegate was not set.");
326+
return;
327+
}
328+
var attribution = new AdjustAttribution(dicAttributionData);
329+
Adjust.attributionChangedDelegate(attribution);
330+
}
331+
315332
public void GetNativeAttribution(string attributionData) {
316333
if (instance == null) {
317334
Debug.Log(Adjust.errorMessage);

Assets/Adjust/AdjustUnityWS10.dll

4.5 KB
Binary file not shown.

Assets/Adjust/AdjustUnityWP.dll.meta renamed to Assets/Adjust/AdjustUnityWS10.dll.meta

+30-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Adjust/AdjustUnityWS81.dll

4.5 KB
Binary file not shown.

Assets/Adjust/AdjustUnityWS.dll.meta renamed to Assets/Adjust/AdjustUnityWS81.dll.meta

+31-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Adjust/Android/AdjustAndroid.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace com.adjust.sdk {
88
#if UNITY_ANDROID
99
public class AdjustAndroid : IAdjust {
1010
#region Fields
11-
private const string sdkPrefix = "unity4.11.0";
11+
private const string sdkPrefix = "unity4.11.1";
1212

1313
private static bool launchDeferredDeeplink = true;
1414

3.51 KB
Binary file not shown.

Assets/Adjust/Metro/Microsoft.Threading.Tasks.Extensions.dll.meta renamed to Assets/Adjust/Android/adjust-android.jar.meta

+6-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Adjust/Metro/AdjustMetro.cs

+79-13
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,21 @@
44
using System.Collections.Generic;
55

66
using UnityEngine;
7-
using AdjustUnityWS;
8-
7+
#if UNITY_WSA_10_0
8+
using AdjustUnityWS10;
9+
#elif UNITY_WINRT_8_1
10+
using AdjustUnityWS81;
11+
#endif
912
namespace com.adjust.sdk {
1013
public class AdjustMetro : IAdjust {
1114
private const string sdkPrefix = "unity4.11.0";
1215

1316
public bool isEnabled() {
14-
return AdjustWS.IsEnabled();
17+
#if UNITY_WSA_10_0
18+
return AdjustWS10.IsEnabled();
19+
#elif UNITY_WINRT_8_1
20+
return AdjustWS81.IsEnabled();
21+
#endif
1522
}
1623

1724
public string getAdid() {
@@ -23,35 +30,54 @@ public AdjustAttribution getAttribution() {
2330
}
2431

2532
public void onPause() {
26-
AdjustWS.ApplicationDeactivated();
33+
#if UNITY_WSA_10_0
34+
AdjustWS10.ApplicationDeactivated();
35+
#elif UNITY_WINRT_8_1
36+
AdjustWS81.ApplicationDeactivated();
37+
#endif
2738
}
2839

2940
public void onResume() {
30-
AdjustWS.ApplicationActivated();
41+
#if UNITY_WSA_10_0
42+
AdjustWS10.ApplicationActivated();
43+
#elif UNITY_WINRT_8_1
44+
AdjustWS81.ApplicationActivated();
45+
#endif
3146
}
3247

3348
public void setEnabled(bool enabled) {
34-
AdjustWS.SetEnabled(enabled);
49+
#if UNITY_WSA_10_0
50+
AdjustWS10.SetEnabled(enabled);
51+
#elif UNITY_WINRT_8_1
52+
AdjustWS81.SetEnabled(enabled);
53+
#endif
3554
}
3655

3756
public void setOfflineMode(bool offlineMode) {
38-
AdjustWS.SetOfflineMode(offlineMode);
57+
#if UNITY_WSA_10_0
58+
AdjustWS10.SetOfflineMode(offlineMode);
59+
#elif UNITY_WINRT_8_1
60+
AdjustWS81.SetOfflineMode(offlineMode);
61+
#endif
3962
}
4063

4164
public void start(AdjustConfig adjustConfig) {
4265
string logLevelString = null;
43-
string environment = adjustConfig.environment.lowercaseToString();
66+
string environment = lowercaseToString(adjustConfig.environment);
4467
Action<Dictionary<string, string>> attributionChangedDictionary = null;
4568

46-
if (adjustConfig.logLevel != null) {
47-
logLevelString = adjustConfig.lowercaseToString();
69+
if (adjustConfig.logLevel.HasValue) {
70+
logLevelString = lowercaseToString(adjustConfig.logLevel.Value);
4871
}
4972

5073
if (adjustConfig.attributionChangedDelegate != null) {
5174
attributionChangedDictionary = (attributionDictionary) => Adjust.runAttributionChangedDictionary(attributionDictionary);
5275
}
53-
54-
AdjustWS.ApplicationLaunching(
76+
#if UNITY_WSA_10_0
77+
AdjustWS10.ApplicationLaunching(
78+
#elif UNITY_WINRT_8_1
79+
AdjustWS81.ApplicationLaunching(
80+
#endif
5581
appToken:adjustConfig.appToken,
5682
logLevelString:logLevelString,
5783
environment:environment,
@@ -63,8 +89,48 @@ public void start(AdjustConfig adjustConfig) {
6389
);
6490
}
6591

92+
public static string lowercaseToString(AdjustLogLevel AdjustLogLevel)
93+
{
94+
switch (AdjustLogLevel)
95+
{
96+
case AdjustLogLevel.Verbose:
97+
return "verbose";
98+
case AdjustLogLevel.Debug:
99+
return "debug";
100+
case AdjustLogLevel.Info:
101+
return "info";
102+
case AdjustLogLevel.Warn:
103+
return "warn";
104+
case AdjustLogLevel.Error:
105+
return "error";
106+
case AdjustLogLevel.Assert:
107+
return "assert";
108+
case AdjustLogLevel.Suppress:
109+
return "suppress";
110+
default:
111+
return "unknown";
112+
}
113+
}
114+
115+
public static string lowercaseToString(AdjustEnvironment adjustEnvironment)
116+
{
117+
switch (adjustEnvironment)
118+
{
119+
case AdjustEnvironment.Sandbox:
120+
return "sandbox";
121+
case AdjustEnvironment.Production:
122+
return "production";
123+
default:
124+
return "unknown";
125+
}
126+
}
127+
66128
public void trackEvent(AdjustEvent adjustEvent) {
67-
AdjustWS.TrackEvent(
129+
#if UNITY_WSA_10_0
130+
AdjustWS10.TrackEvent(
131+
#elif UNITY_WINRT_8_1
132+
AdjustWS81.TrackEvent(
133+
#endif
68134
eventToken:adjustEvent.eventToken,
69135
revenue:adjustEvent.revenue,
70136
currency:adjustEvent.currency,

0 commit comments

Comments
 (0)