Skip to content

Commit dbbc56c

Browse files
author
uerceg
committed
Automatically calling onResume upon SDK start
1 parent 9deccb0 commit dbbc56c

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

Assets/Adjust/Android/AdjustAndroid.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ public void start (AdjustConfig adjustConfig)
8484

8585
ajoAdjustConfig.Call ("setSdkPrefix", sdkPrefix);
8686

87+
// Since INSTALL_REFERRER is not triggering SDK initialisation, call onResume after onCreate.
88+
// OnApplicationPause doesn't get called first time the scene loads, so call to onResume is needed.
89+
8790
ajcAdjust.CallStatic ("onCreate", ajoAdjustConfig);
88-
89-
if (adjustConfig.startAutomatically == true) {
90-
ajcAdjust.CallStatic ("onResume");
91-
}
91+
ajcAdjust.CallStatic ("onResume");
9292
}
9393

9494
public void trackEvent (AdjustEvent adjustEvent)

Assets/Adjust/ExampleGUI/ExampleGUI.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ void OnGUI ()
2626
if (GUI.Button (new Rect (0, Screen.height * 0 / nr_buttons, Screen.width, Screen.height / nr_buttons), txtManualLaunch)) {
2727
if (!string.Equals(txtManualLaunch, "SDK Launched", StringComparison.OrdinalIgnoreCase)) {
2828
AdjustConfig adjustConfig = new AdjustConfig ("{YourAppToken}", AdjustEnvironment.Sandbox);
29-
adjustConfig.setStartAutomatically(true);
3029
adjustConfig.setLogLevel (AdjustLogLevel.Verbose);
3130
adjustConfig.setAttributionChangedDelegate (this.attributionChangedDelegate);
3231

Assets/Adjust/Unity/AdjustConfig.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ public class AdjustConfig
88
internal string sceneName;
99
internal string defaultTracker;
1010

11-
internal bool? startAutomatically;
1211
internal bool? eventBufferingEnabled;
1312

1413
internal AdjustLogLevel? logLevel;
@@ -26,7 +25,6 @@ public AdjustConfig (string appToken, AdjustEnvironment environment)
2625
this.sceneName = "";
2726
this.appToken = appToken;
2827
this.environment = environment;
29-
this.startAutomatically = false;
3028
this.macMd5TrackingEnabled = false;
3129
this.processName = "";
3230
}
@@ -36,11 +34,6 @@ public void setLogLevel (AdjustLogLevel logLevel)
3634
this.logLevel = logLevel;
3735
}
3836

39-
public void setStartAutomatically (bool shouldStartAutomatically)
40-
{
41-
this.startAutomatically = shouldStartAutomatically;
42-
}
43-
4437
public void setDefaultTracker (string defaultTracker)
4538
{
4639
this.defaultTracker = defaultTracker;

0 commit comments

Comments
 (0)