Skip to content

Commit cc7632f

Browse files
authored
Merge pull request #103 from adjust/v4310
Version 4.31.0
2 parents 75ae84f + 234ef4f commit cc7632f

File tree

24 files changed

+90
-23
lines changed

24 files changed

+90
-23
lines changed

Assets/Adjust/Android/AdjustAndroid.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace com.adjust.sdk
88
#if UNITY_ANDROID
99
public class AdjustAndroid
1010
{
11-
private const string sdkPrefix = "unity4.30.0";
11+
private const string sdkPrefix = "unity4.31.0";
1212
private static bool launchDeferredDeeplink = true;
1313
private static AndroidJavaClass ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
1414
private static AndroidJavaObject ajoCurrentActivity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity");
@@ -371,6 +371,8 @@ public static AdjustAttribution GetAttribution()
371371
}
372372
adjustAttribution.costCurrency = ajoAttribution.Get<string>(AdjustUtils.KeyCostCurrency) == "" ?
373373
null : ajoAttribution.Get<string>(AdjustUtils.KeyCostCurrency);
374+
adjustAttribution.fbInstallReferrer = ajoAttribution.Get<string>(AdjustUtils.KeyFbInstallReferrer) == "" ?
375+
null : ajoAttribution.Get<string>(AdjustUtils.KeyFbInstallReferrer);
374376
return adjustAttribution;
375377
}
376378
catch (Exception) {}
@@ -677,6 +679,8 @@ public void onAttributionChanged(AndroidJavaObject attribution)
677679
}
678680
adjustAttribution.costCurrency = attribution.Get<string>(AdjustUtils.KeyCostCurrency) == "" ?
679681
null : attribution.Get<string>(AdjustUtils.KeyCostCurrency);
682+
adjustAttribution.fbInstallReferrer = attribution.Get<string>(AdjustUtils.KeyFbInstallReferrer) == "" ?
683+
null : attribution.Get<string>(AdjustUtils.KeyFbInstallReferrer);
680684
callback(adjustAttribution);
681685
}
682686
}
-3.57 KB
Binary file not shown.

Assets/Adjust/Editor/AdjustCustomEditor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public override void OnInspectorGUI()
4040
adjust.launchDeferredDeeplink = EditorGUILayout.Toggle("Launch Deferred Deep Link", adjust.launchDeferredDeeplink);
4141
adjust.needsCost = EditorGUILayout.Toggle("Cost Data In Attribution Callback", adjust.needsCost);
4242
adjust.coppaCompliant = EditorGUILayout.Toggle("COPPA Compliant", adjust.coppaCompliant);
43+
adjust.linkMe = EditorGUILayout.Toggle("LinkMe", adjust.linkMe);
4344
adjust.defaultTracker = EditorGUILayout.TextField("Default Tracker", adjust.defaultTracker);
4445
adjust.startDelay = EditorGUILayout.DoubleField("Start Delay", adjust.startDelay);
4546
EditorGUILayout.LabelField("App Secret:", EditorStyles.label);

Assets/Adjust/Prefab/Adjust.prefab

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ GameObject:
88
serializedVersion: 5
99
m_Component:
1010
- component: {fileID: 415478}
11-
- component: {fileID: 11482148}
11+
- component: {fileID: 114179903453641630}
1212
m_Layer: 0
1313
m_Name: Adjust
1414
m_TagString: Untagged
@@ -29,7 +29,18 @@ Transform:
2929
m_Father: {fileID: 0}
3030
m_RootOrder: 0
3131
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
32-
--- !u!114 &11482148
32+
--- !u!1001 &100100000
33+
Prefab:
34+
m_ObjectHideFlags: 1
35+
serializedVersion: 2
36+
m_Modification:
37+
m_TransformParent: {fileID: 0}
38+
m_Modifications: []
39+
m_RemovedComponents: []
40+
m_ParentPrefab: {fileID: 0}
41+
m_RootGameObject: {fileID: 115478}
42+
m_IsPrefabParent: 1
43+
--- !u!114 &114179903453641630
3344
MonoBehaviour:
3445
m_ObjectHideFlags: 1
3546
m_PrefabParentObject: {fileID: 0}
@@ -49,6 +60,7 @@ MonoBehaviour:
4960
launchDeferredDeeplink: 1
5061
needsCost: 0
5162
coppaCompliant: 0
63+
linkMe: 0
5264
defaultTracker:
5365
urlStrategy: 0
5466
startDelay: 0
@@ -64,14 +76,3 @@ MonoBehaviour:
6476
adServicesInfoReading: 1
6577
idfaInfoReading: 1
6678
skAdNetworkHandling: 1
67-
--- !u!1001 &100100000
68-
Prefab:
69-
m_ObjectHideFlags: 1
70-
serializedVersion: 2
71-
m_Modification:
72-
m_TransformParent: {fileID: 0}
73-
m_Modifications: []
74-
m_RemovedComponents: []
75-
m_ParentPrefab: {fileID: 0}
76-
m_RootGameObject: {fileID: 115478}
77-
m_IsPrefabParent: 1

Assets/Adjust/Test/CommandExecutor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ private void Config()
411411
_testLibrary.AddInfoToSend("costType", attribution.costType);
412412
_testLibrary.AddInfoToSend("costAmount", attribution.costAmount.ToString());
413413
_testLibrary.AddInfoToSend("costCurrency", attribution.costCurrency);
414+
_testLibrary.AddInfoToSend("fbInstallReferrer", attribution.fbInstallReferrer);
414415
_testLibrary.SendInfoToServer(localExtraPath);
415416
});
416417
}

Assets/Adjust/Test/TestApp.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ public class TestApp : MonoBehaviour
1212
#if UNITY_ANDROID
1313
private const string PORT = ":8443";
1414
private const string PROTOCOL = "https://";
15-
private const string IP = "192.168.86.80";
15+
private const string IP = "192.168.86.43";
1616
#elif UNITY_IOS
1717
private const string PORT = ":8080";
1818
private const string PROTOCOL = "http://";
19-
private const string IP = "192.168.86.80";
19+
private const string IP = "192.168.86.43";
2020
private TestLibraryiOS _testLibraryiOS;
2121
#else
2222
private const string PORT = ":8080";

Assets/Adjust/Unity/Adjust.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public class Adjust : MonoBehaviour
3333
[HideInInspector]
3434
public bool coppaCompliant = false;
3535
[HideInInspector]
36+
public bool linkMe = false;
37+
[HideInInspector]
3638
public string defaultTracker;
3739
[HideInInspector]
3840
public AdjustUrlStrategy urlStrategy = AdjustUrlStrategy.Default;
@@ -121,6 +123,7 @@ void Awake()
121123
adjustConfig.setAllowIdfaReading(this.idfaInfoReading);
122124
adjustConfig.setCoppaCompliantEnabled(this.coppaCompliant);
123125
adjustConfig.setPlayStoreKidsAppEnabled(this.playStoreKidsApp);
126+
adjustConfig.setLinkMeEnabled(this.linkMe);
124127
if (!skAdNetworkHandling)
125128
{
126129
adjustConfig.deactivateSKAdNetworkHandling();

Assets/Adjust/Unity/AdjustAttribution.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public class AdjustAttribution
1616
public string costType { get; set; }
1717
public double? costAmount { get; set; }
1818
public string costCurrency { get; set; }
19+
// Android only
20+
public string fbInstallReferrer {get; set;}
1921

2022
public AdjustAttribution() {}
2123

@@ -47,6 +49,7 @@ public AdjustAttribution(string jsonString)
4749
// value will default to null
4850
}
4951
costCurrency = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyCostCurrency);
52+
fbInstallReferrer = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyFbInstallReferrer);
5053
}
5154

5255
public AdjustAttribution(Dictionary<string, string> dicAttributionData)
@@ -76,6 +79,7 @@ public AdjustAttribution(Dictionary<string, string> dicAttributionData)
7679
// value will default to null
7780
}
7881
costCurrency = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyCostCurrency);
82+
fbInstallReferrer = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyFbInstallReferrer);
7983
}
8084
}
8185
}

Assets/Adjust/Unity/AdjustConfig.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public class AdjustConfig
5959
internal bool? allowAdServicesInfoReading;
6060
internal bool? allowIdfaReading;
6161
internal bool? skAdNetworkHandling;
62+
internal bool? linkMeEnabled;
6263
// Windows specific members
6364
internal Action<String> logDelegate;
6465

@@ -149,6 +150,11 @@ public void deactivateSKAdNetworkHandling()
149150
this.skAdNetworkHandling = true;
150151
}
151152

153+
public void setLinkMeEnabled(bool linkMeEnabled)
154+
{
155+
this.linkMeEnabled = linkMeEnabled;
156+
}
157+
152158
public void setDeferredDeeplinkDelegate(Action<string> deferredDeeplinkDelegate, string sceneName = "Adjust")
153159
{
154160
this.deferredDeeplinkDelegate = deferredDeeplinkDelegate;

Assets/Adjust/Unity/AdjustUtils.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public class AdjustUtils
2424
public static string KeyCostType = "costType";
2525
public static string KeyCostAmount = "costAmount";
2626
public static string KeyCostCurrency = "costCurrency";
27+
public static string KeyFbInstallReferrer = "fbInstallReferrer";
2728

2829
// For testing purposes.
2930
public static string KeyTestOptionsBaseUrl = "baseUrl";

0 commit comments

Comments
 (0)