@@ -8,7 +8,7 @@ namespace AdjustSdk
8
8
#if UNITY_ANDROID
9
9
public class AdjustAndroid
10
10
{
11
- private const string sdkPrefix = "unity5.1.3 " ;
11
+ private const string sdkPrefix = "unity5.3.0 " ;
12
12
private static bool isDeferredDeeplinkOpeningEnabled = true ;
13
13
private static AndroidJavaClass ajcAdjust = new AndroidJavaClass ( "com.adjust.sdk.Adjust" ) ;
14
14
private static AndroidJavaObject ajoCurrentActivity = new AndroidJavaClass ( "com.unity3d.player.UnityPlayer" ) . GetStatic < AndroidJavaObject > ( "currentActivity" ) ;
@@ -127,6 +127,15 @@ public static void InitSdk(AdjustConfig adjustConfig)
127
127
}
128
128
}
129
129
130
+ // check if first session delay has been enabled
131
+ if ( adjustConfig . IsFirstSessionDelayEnabled != null )
132
+ {
133
+ if ( adjustConfig . IsFirstSessionDelayEnabled == true )
134
+ {
135
+ ajoAdjustConfig . Call ( "enableFirstSessionDelay" ) ;
136
+ }
137
+ }
138
+
130
139
// check if user has set custom preinstall file path
131
140
if ( adjustConfig . PreinstallFilePath != null )
132
141
{
@@ -396,6 +405,14 @@ public static void ProcessDeeplink(AdjustDeeplink deeplink)
396
405
using ( AndroidJavaObject ajoUri = ajcUri . CallStatic < AndroidJavaObject > ( "parse" , deeplink . Deeplink ) )
397
406
using ( AndroidJavaObject ajoAdjustDeeplink = new AndroidJavaObject ( "com.adjust.sdk.AdjustDeeplink" , ajoUri ) )
398
407
{
408
+ if ( deeplink . Referrer != null )
409
+ {
410
+ using ( AndroidJavaObject ajoReferrer = ajcUri . CallStatic < AndroidJavaObject > ( "parse" , deeplink . Referrer ) )
411
+ {
412
+ ajoAdjustDeeplink . Call ( "setReferrer" , ajoReferrer ) ;
413
+ }
414
+ }
415
+
399
416
ajcAdjust . CallStatic ( "processDeeplink" , ajoAdjustDeeplink , ajoCurrentActivity ) ;
400
417
}
401
418
}
@@ -576,6 +593,38 @@ public static void GetAttribution(Action<AdjustAttribution> onAttributionRead)
576
593
ajcAdjust . CallStatic ( "getAttribution" , onAttributionReadProxy ) ;
577
594
}
578
595
596
+ public static void GetSdkVersion ( Action < string > onSdkVersionRead )
597
+ {
598
+ SdkVersionReadListener onSdkVersionReadProxy = new SdkVersionReadListener ( onSdkVersionRead , sdkPrefix ) ;
599
+ ajcAdjust . CallStatic ( "getSdkVersion" , onSdkVersionReadProxy ) ;
600
+ }
601
+
602
+ public static void GetLastDeeplink ( Action < string > onLastDeeplinkRead )
603
+ {
604
+ LastDeeplinkListener onLastDeeplinkReadProxy = new LastDeeplinkListener ( onLastDeeplinkRead ) ;
605
+ ajcAdjust . CallStatic ( "getLastDeeplink" , ajoCurrentActivity , onLastDeeplinkReadProxy ) ;
606
+ }
607
+
608
+ public static void EndFirstSessionDelay ( )
609
+ {
610
+ ajcAdjust . CallStatic ( "endFirstSessionDelay" ) ;
611
+ }
612
+
613
+ public static void EnableCoppaComplianceInDelay ( )
614
+ {
615
+ ajcAdjust . CallStatic ( "enableCoppaComplianceInDelay" ) ;
616
+ }
617
+
618
+ public static void DisableCoppaComplianceInDelay ( )
619
+ {
620
+ ajcAdjust . CallStatic ( "disableCoppaComplianceInDelay" ) ;
621
+ }
622
+
623
+ public static void SetExternalDeviceIdInDelay ( string externalDeviceId )
624
+ {
625
+ ajcAdjust . CallStatic ( "setExternalDeviceIdInDelay" , externalDeviceId ) ;
626
+ }
627
+
579
628
// android specific methods
580
629
public static void GetGoogleAdId ( Action < string > onDeviceIdsRead )
581
630
{
@@ -589,18 +638,6 @@ public static void GetAmazonAdId(Action<string> onAmazonAdIdRead)
589
638
ajcAdjust . CallStatic ( "getAmazonAdId" , ajoCurrentActivity , onAmazonAdIdReadProxy ) ;
590
639
}
591
640
592
- public static void GetSdkVersion ( Action < string > onSdkVersionRead )
593
- {
594
- SdkVersionReadListener onSdkVersionReadProxy = new SdkVersionReadListener ( onSdkVersionRead , sdkPrefix ) ;
595
- ajcAdjust . CallStatic ( "getSdkVersion" , onSdkVersionReadProxy ) ;
596
- }
597
-
598
- public static void GetLastDeeplink ( Action < string > onLastDeeplinkRead )
599
- {
600
- LastDeeplinkListener onLastDeeplinkReadProxy = new LastDeeplinkListener ( onLastDeeplinkRead ) ;
601
- ajcAdjust . CallStatic ( "getLastDeeplink" , ajoCurrentActivity , onLastDeeplinkReadProxy ) ;
602
- }
603
-
604
641
public static void VerifyPlayStorePurchase (
605
642
AdjustPlayStorePurchase purchase ,
606
643
Action < AdjustPurchaseVerificationResult > verificationInfoCallback )
@@ -621,6 +658,14 @@ public static void ProcessAndResolveDeeplink(AdjustDeeplink deeplink, Action<str
621
658
using ( AndroidJavaObject ajoUri = ajcUri . CallStatic < AndroidJavaObject > ( "parse" , deeplink . Deeplink ) )
622
659
using ( AndroidJavaObject ajoAdjustDeeplink = new AndroidJavaObject ( "com.adjust.sdk.AdjustDeeplink" , ajoUri ) )
623
660
{
661
+ if ( deeplink . Referrer != null )
662
+ {
663
+ using ( AndroidJavaObject ajoReferrer = ajcUri . CallStatic < AndroidJavaObject > ( "parse" , deeplink . Referrer ) )
664
+ {
665
+ ajoAdjustDeeplink . Call ( "setReferrer" , ajoReferrer ) ;
666
+ }
667
+ }
668
+
624
669
ajcAdjust . CallStatic (
625
670
"processAndResolveDeeplink" ,
626
671
ajoAdjustDeeplink ,
@@ -693,6 +738,16 @@ public static void VerifyAndTrackPlayStorePurchase(
693
738
}
694
739
}
695
740
741
+ public static void EnablePlayStoreKidsComplianceInDelay ( )
742
+ {
743
+ ajcAdjust . CallStatic ( "enablePlayStoreKidsComplianceInDelay" ) ;
744
+ }
745
+
746
+ public static void DisablePlayStoreKidsComplianceInDelay ( )
747
+ {
748
+ ajcAdjust . CallStatic ( "disablePlayStoreKidsComplianceInDelay" ) ;
749
+ }
750
+
696
751
// used for testing only
697
752
public static void SetTestOptions ( Dictionary < string , string > testOptions )
698
753
{
0 commit comments