Skip to content

Commit be719e5

Browse files
committed
feat: add ability to read android device info only once
1 parent 3c1f9e8 commit be719e5

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Assets/Adjust/Android/AdjustAndroid.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ public static void Start(AdjustConfig adjustConfig)
9393
ajoAdjustConfig.Call("setFinalAttributionEnabled", adjustConfig.finalAndroidAttributionEnabled.Value);
9494
}
9595

96+
// Check read Android IDs only once.
97+
if (adjustConfig.readDeviceInfoOnceEnabled != null)
98+
{
99+
ajoAdjustConfig.Call("setReadDeviceInfoOnceEnabled", adjustConfig.readDeviceInfoOnceEnabled.Value);
100+
}
101+
96102
// Check Play Store Kids Apps setting.
97103
if (adjustConfig.playStoreKidsAppEnabled != null)
98104
{

Assets/Adjust/Unity/AdjustConfig.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public class AdjustConfig
4444
internal bool? allowSuppressLogLevel;
4545
internal bool? needsCost;
4646
internal bool launchDeferredDeeplink;
47-
internal bool? finalAndroidAttributionEnabled;
4847
internal AdjustLogLevel? logLevel;
4948
internal AdjustEnvironment environment;
5049
internal Action<string> deferredDeeplinkDelegate;
@@ -61,7 +60,9 @@ public class AdjustConfig
6160
internal bool? readImei;
6261
internal bool? preinstallTrackingEnabled;
6362
internal string preinstallFilePath;
63+
internal bool? finalAndroidAttributionEnabled;
6464
internal string fbAppId;
65+
internal bool readDeviceInfoOnceEnabled;
6566
// iOS specific members
6667
internal bool? allowAdServicesInfoReading;
6768
internal bool? allowIdfaReading;
@@ -313,6 +314,11 @@ public void setFbAppId(string fbAppId)
313314
this.fbAppId = fbAppId;
314315
}
315316

317+
public void setReadDeviceInfoOnceEnabled(bool readDeviceInfoOnceEnabled)
318+
{
319+
this.readDeviceInfoOnceEnabled = readDeviceInfoOnceEnabled;
320+
}
321+
316322
// Windows specific methods.
317323
public void setLogDelegate(Action<String> logDelegate)
318324
{

0 commit comments

Comments
 (0)