Skip to content

Commit e3fc6e1

Browse files
committed
Merge pull request #53 from adjust/foreground_background
Foreground background
2 parents 6c4e020 + dbbc56c commit e3fc6e1

File tree

12 files changed

+16
-47
lines changed

12 files changed

+16
-47
lines changed

Assets/Adjust/Android/AdjustAndroid.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace com.adjust.sdk
1010
#if UNITY_ANDROID
1111
public class AdjustAndroid : IAdjust
1212
{
13-
private const string sdkPrefix = "unity4.0.3";
13+
private const string sdkPrefix = "unity4.0.4";
1414
private AndroidJavaClass ajcAdjust;
1515
private AndroidJavaObject ajoCurrentActivity;
1616
private AttributionChangeListener onAttributionChangedListener;
@@ -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)
276 Bytes
Binary file not shown.

Assets/Adjust/Android/adjust-android.jar.meta

Lines changed: 0 additions & 23 deletions
This file was deleted.

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;

Assets/Adjust/iOS/ADJConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
* @param delegate The delegate that might implement the optional delegate
8989
* methods like adjustAttributionChanged:
9090
*/
91-
@property (nonatomic, retain) NSObject<AdjustDelegate> *delegate;
91+
@property (nonatomic, weak) NSObject<AdjustDelegate> *delegate;
9292
@property (nonatomic, assign) BOOL hasDelegate;
9393

9494
- (BOOL) isValid;

Assets/Adjust/iOS/Adjust.a

-780 KB
Binary file not shown.

Assets/Adjust/iOS/AdjustiOS.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace com.adjust.sdk
1010
#if UNITY_IOS
1111
public class AdjustiOS : IAdjust
1212
{
13-
private const string sdkPrefix = "unity4.0.3";
13+
private const string sdkPrefix = "unity4.0.4";
1414

1515
#region External methods
1616

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0.3
1+
4.0.4

doc/migrate.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
## Migrate your adjust SDK for Unity3d to 4.0.3 from 3.4.4
1+
## Migrate your adjust SDK for Unity3d to 4.0.4 from 3.4.4
22

3-
N.B. At the moment, SDK 4.0.3 for Unity supports Android and iOS, but not Windows. If you are planning to release your Unity app on Windows, please migrate to 4.0.3 only when we add full support for Windows.
3+
N.B. At the moment, SDK 4.0.4 for Unity supports Android and iOS, but not Windows. If you are planning to release your Unity app on Windows, please migrate to 4.0.4 only when we add full support for Windows.
44

55
### Migration procedure
66

7-
Starting from version 4.0.3, the structure of this repository is adjusted to Unity 5. All files which are part of the
7+
Starting from version 4.0.4, the structure of this repository is adjusted to Unity 5. All files which are part of the
88
adjust SDK are now moved to the `Assets/Adjust` folder, since Unity 5 allows that native files can now be placed
99
outside of `Assets/Plugins` folder. This is done so that adjust files are no longer mixed with files you may be
1010
keeping in `Assets/Plugins` folder.
1111

1212
For migration purposes, we have prepared two Unity packages:
1313

14-
* `Adjust_v4.0.3_Unity_4.unitypackage` (for Unity 4 users)
15-
* `Adjust_v4.0.3_Unity_5.unitypackage` (for Unity 5 users)
14+
* `Adjust_v4.0.4_Unity_4.unitypackage` (for Unity 4 users)
15+
* `Adjust_v4.0.4_Unity_5.unitypackage` (for Unity 5 users)
1616

1717
and the adjust SDK uninstall script written in Python (`adjust_uninstall.py`).
1818

19-
Migration to version 4.0.3 of our SDK requires the following steps:
19+
Migration to version 4.0.4 of our SDK requires the following steps:
2020

2121
1. Copy the `adjust_uninstall.py` script to your root Unity project directory and run it. This script should
2222
delete all adjust source files from the previous SDK version you had.

0 commit comments

Comments
 (0)