@@ -8,7 +8,7 @@ namespace AdjustSdk
88#if UNITY_ANDROID
99 public class AdjustAndroid
1010 {
11- private const string sdkPrefix = "unity5.1.3 " ;
11+ private const string sdkPrefix = "unity5.3.0 " ;
1212 private static bool isDeferredDeeplinkOpeningEnabled = 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" ) ;
@@ -127,6 +127,15 @@ public static void InitSdk(AdjustConfig adjustConfig)
127127 }
128128 }
129129
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+
130139 // check if user has set custom preinstall file path
131140 if ( adjustConfig . PreinstallFilePath != null )
132141 {
@@ -396,6 +405,14 @@ public static void ProcessDeeplink(AdjustDeeplink deeplink)
396405 using ( AndroidJavaObject ajoUri = ajcUri . CallStatic < AndroidJavaObject > ( "parse" , deeplink . Deeplink ) )
397406 using ( AndroidJavaObject ajoAdjustDeeplink = new AndroidJavaObject ( "com.adjust.sdk.AdjustDeeplink" , ajoUri ) )
398407 {
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+
399416 ajcAdjust . CallStatic ( "processDeeplink" , ajoAdjustDeeplink , ajoCurrentActivity ) ;
400417 }
401418 }
@@ -576,6 +593,38 @@ public static void GetAttribution(Action<AdjustAttribution> onAttributionRead)
576593 ajcAdjust . CallStatic ( "getAttribution" , onAttributionReadProxy ) ;
577594 }
578595
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+
579628 // android specific methods
580629 public static void GetGoogleAdId ( Action < string > onDeviceIdsRead )
581630 {
@@ -589,18 +638,6 @@ public static void GetAmazonAdId(Action<string> onAmazonAdIdRead)
589638 ajcAdjust . CallStatic ( "getAmazonAdId" , ajoCurrentActivity , onAmazonAdIdReadProxy ) ;
590639 }
591640
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-
604641 public static void VerifyPlayStorePurchase (
605642 AdjustPlayStorePurchase purchase ,
606643 Action < AdjustPurchaseVerificationResult > verificationInfoCallback )
@@ -621,6 +658,14 @@ public static void ProcessAndResolveDeeplink(AdjustDeeplink deeplink, Action<str
621658 using ( AndroidJavaObject ajoUri = ajcUri . CallStatic < AndroidJavaObject > ( "parse" , deeplink . Deeplink ) )
622659 using ( AndroidJavaObject ajoAdjustDeeplink = new AndroidJavaObject ( "com.adjust.sdk.AdjustDeeplink" , ajoUri ) )
623660 {
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+
624669 ajcAdjust . CallStatic (
625670 "processAndResolveDeeplink" ,
626671 ajoAdjustDeeplink ,
@@ -693,6 +738,16 @@ public static void VerifyAndTrackPlayStorePurchase(
693738 }
694739 }
695740
741+ public static void EnablePlayStoreKidsComplianceInDelay ( )
742+ {
743+ ajcAdjust . CallStatic ( "enablePlayStoreKidsComplianceInDelay" ) ;
744+ }
745+
746+ public static void DisablePlayStoreKidsComplianceInDelay ( )
747+ {
748+ ajcAdjust . CallStatic ( "disablePlayStoreKidsComplianceInDelay" ) ;
749+ }
750+
696751 // used for testing only
697752 public static void SetTestOptions ( Dictionary < string , string > testOptions )
698753 {
0 commit comments