Skip to content

Commit

Permalink
Merge pull request #145 from adjust/v4171
Browse files Browse the repository at this point in the history
Version 4.17.1
  • Loading branch information
uerceg authored Mar 21, 2019
2 parents 4dddbd2 + 565596e commit 36a2bed
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 54 deletions.
2 changes: 1 addition & 1 deletion Assets/Adjust/Android/AdjustAndroid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace com.adjust.sdk
#if UNITY_ANDROID
public class AdjustAndroid
{
private const string sdkPrefix = "unity4.17.0";
private const string sdkPrefix = "unity4.17.1";
private static bool launchDeferredDeeplink = true;
private static AndroidJavaClass ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
private static AndroidJavaObject ajoCurrentActivity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity");
Expand Down
Binary file modified Assets/Adjust/Android/adjust-android.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion Assets/Adjust/Windows/AdjustWindows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace com.adjust.sdk
{
public class AdjustWindows
{
private const string sdkPrefix = "unity4.17.0";
private const string sdkPrefix = "unity4.17.1";
private static bool appLaunched = false;

public static void Start(AdjustConfig adjustConfig)
Expand Down
2 changes: 1 addition & 1 deletion Assets/Adjust/iOS/Adjust.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Adjust.h
// Adjust
//
// V4.17.1
// V4.17.2
// Created by Christian Wellenbrock (wellle) on 23rd July 2013.
// Copyright © 2012-2017 Adjust GmbH. All rights reserved.
//
Expand Down
Binary file modified Assets/Adjust/iOS/AdjustSdk.a
Binary file not shown.
2 changes: 1 addition & 1 deletion Assets/Adjust/iOS/AdjustiOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace com.adjust.sdk
#if UNITY_IOS
public class AdjustiOS
{
private const string sdkPrefix = "unity4.17.0";
private const string sdkPrefix = "unity4.17.1";

[DllImport("__Internal")]
private static extern void _AdjustLaunchApp(
Expand Down
Binary file modified Assets/Adjust/iOS/Test/AdjustTestLibrary.a
Binary file not shown.
84 changes: 39 additions & 45 deletions Assets/Editor/AdjustEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,60 +384,23 @@ private static void AddBroadcastReceiver(XmlDocument manifest)
// Let's now check if user has already defined a receiver which is listening to INSTALL_REFERRER intent.
// If that is already defined, don't force the Adjust broadcast receiver to the manifest file.
// If not, add the Adjust broadcast receiver to the manifest file.
bool isThereAnyCustomBroadcastReiver = false;
bool isUsedBroadcastReceiverOurs = false;

foreach (XmlNode node in applicationNode.ChildNodes)
List<XmlNode> customBroadcastReceiversNodes = getCustomRecieverNodes(applicationNode);
if (customBroadcastReceiversNodes.Count > 0)
{
if (node.Name == "receiver")
bool foundAdjustBroadcastReceiver = false;
for (int i = 0; i < customBroadcastReceiversNodes.Count; i += 1)
{
foreach (XmlNode subnode in node.ChildNodes)
{
if (subnode.Name == "intent-filter")
{
foreach (XmlNode subsubnode in subnode.ChildNodes)
{
if (subsubnode.Name == "action")
{
foreach (XmlAttribute attribute in subsubnode.Attributes)
{
if (attribute.Value.Contains("com.android.vending.INSTALL_REFERRER"))
{
isThereAnyCustomBroadcastReiver = true;
}
}
}
}
}
}

// At this point we figured out if there is a broadcast receiver for INSTALL_REFERRER intent.
// In case there is one, let's check if that receiver is actually our broadcast receiver.
// If it is, no need to warn about usage of custom broadcast receiver.

if (!isThereAnyCustomBroadcastReiver)
{
// If there's no custom broadcast receiver, that's it, that's all.
break;
}
else
foreach (XmlAttribute attribute in customBroadcastReceiversNodes[i].Attributes)
{
// If there's custom broadcast receiver, let's iterate on "receiver" attributes a bit more to see if it's ours.
foreach (XmlAttribute attribute in node.Attributes)
if (attribute.Value.Contains("com.adjust.sdk.AdjustReferrerReceiver"))
{
if (attribute.Value.Contains("com.adjust.sdk.AdjustReferrerReceiver"))
{
isUsedBroadcastReceiverOurs = true;
}
foundAdjustBroadcastReceiver = true;
}
}
}
}

// Let's see what we have found so far.
if (isThereAnyCustomBroadcastReiver)
{
if (!isUsedBroadcastReceiverOurs)
if (!foundAdjustBroadcastReceiver)
{
UnityEngine.Debug.Log("[Adjust]: It seems like you are using your own broadcast receiver.");
UnityEngine.Debug.Log("[Adjust]: Please, add the calls to the Adjust broadcast receiver like described in here: https://github.com/adjust/android_sdk/blob/master/doc/english/referrer.md");
Expand Down Expand Up @@ -484,4 +447,35 @@ private static void CleanManifestFile(String manifestPath)
manifestWriter.Write(manifestContent);
manifestWriter.Close();
}

private static List<XmlNode> getCustomRecieverNodes(XmlNode applicationNode)
{
List<XmlNode> nodes = new List<XmlNode>();
foreach (XmlNode node in applicationNode.ChildNodes)
{
if (node.Name == "receiver")
{
foreach (XmlNode subnode in node.ChildNodes)
{
if (subnode.Name == "intent-filter")
{
foreach (XmlNode subsubnode in subnode.ChildNodes)
{
if (subsubnode.Name == "action")
{
foreach (XmlAttribute attribute in subsubnode.Attributes)
{
if (attribute.Value.Contains("com.android.vending.INSTALL_REFERRER"))
{
nodes.Add(node);
}
}
}
}
}
}
}
}
return nodes;
}
}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
### Version 4.17.1 (21st March 2019)
#### Fixed
- Fixed bug in `AdjustEditor.cs` which would add multiple instance of Adjust broadcast receiver to `AndroidManifest.xml` (https://github.com/adjust/unity_sdk/issues/144).

#### Native SDKs
- [[email protected]][ios_sdk_v4.17.2]
- [[email protected]][android_sdk_v4.17.0]
- [[email protected]][windows_sdk_v4.17.0]

---

### Version 4.17.0 (13th December 2018)
#### Added
- Added `getSdkVersion()` method to `Adjust` interface to obtain current SDK version string.
Expand Down Expand Up @@ -542,6 +553,7 @@
[ios_sdk_v4.14.1]: https://github.com/adjust/ios_sdk/tree/v4.14.1
[ios_sdk_v4.15.0]: https://github.com/adjust/ios_sdk/tree/v4.15.0
[ios_sdk_v4.17.1]: https://github.com/adjust/ios_sdk/tree/v4.17.1
[ios_sdk_v4.17.2]: https://github.com/adjust/ios_sdk/tree/v4.17.2

[android_sdk_v3.5.0]: https://github.com/adjust/android_sdk/tree/v3.5.0
[android_sdk_v4.1.0]: https://github.com/adjust/android_sdk/tree/v4.1.0
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.17.0
4.17.1
4 changes: 2 additions & 2 deletions doc/english/migration/migrate.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Migrate your Adjust SDK for Unity3d to 4.17.0 from 3.4.4
## Migrate your Adjust SDK for Unity3d to 4.17.1 from 3.4.4

### Migration procedure

Expand All @@ -9,7 +9,7 @@ keeping in `Assets/Plugins` folder.

For migration purposes, we have prepared the Adjust SDK uninstall script written in Python (`adjust_uninstall.py`).

Migration to version 4.17.0 of our SDK requires the following steps:
Migration to version 4.17.1 of our SDK requires the following steps:

1. Copy the `adjust_uninstall.py` script to your root Unity project directory and run it. This script should
delete all adjust source files from the previous SDK version you had.
Expand Down
2 changes: 1 addition & 1 deletion ext/android/sdk
Submodule sdk updated 34 files
+1 −1 Adjust/build.gradle
+1 −0 Adjust/example-app-kotlin/.gitignore
+40 −0 Adjust/example-app-kotlin/build.gradle
+29 −0 Adjust/example-app-kotlin/proguard-rules.pro
+24 −0 Adjust/example-app-kotlin/src/androidTest/java/com/adjust/examples/ExampleInstrumentedTest.kt
+54 −0 Adjust/example-app-kotlin/src/main/AndroidManifest.xml
+143 −0 Adjust/example-app-kotlin/src/main/java/com/adjust/examples/GlobalApplication.kt
+144 −0 Adjust/example-app-kotlin/src/main/java/com/adjust/examples/MainActivity.kt
+30 −0 Adjust/example-app-kotlin/src/main/java/com/adjust/examples/ServiceActivity.kt
+69 −0 Adjust/example-app-kotlin/src/main/java/com/adjust/examples/ServiceExample.kt
+130 −0 Adjust/example-app-kotlin/src/main/res/layout/activity_main.xml
+29 −0 Adjust/example-app-kotlin/src/main/res/layout/activity_service.xml
+10 −0 Adjust/example-app-kotlin/src/main/res/menu/menu_main.xml
+ Adjust/example-app-kotlin/src/main/res/mipmap-hdpi/ic_launcher.png
+ Adjust/example-app-kotlin/src/main/res/mipmap-mdpi/ic_launcher.png
+ Adjust/example-app-kotlin/src/main/res/mipmap-xhdpi/ic_launcher.png
+ Adjust/example-app-kotlin/src/main/res/mipmap-xxhdpi/ic_launcher.png
+6 −0 Adjust/example-app-kotlin/src/main/res/values-w820dp/dimens.xml
+5 −0 Adjust/example-app-kotlin/src/main/res/values/dimens.xml
+22 −0 Adjust/example-app-kotlin/src/main/res/values/strings.xml
+8 −0 Adjust/example-app-kotlin/src/main/res/values/styles.xml
+17 −0 Adjust/example-app-kotlin/src/test/java/com/adjust/examples/ExampleUnitTest.kt
+141 −1 Adjust/sdk-core/build.gradle
+29 −0 Adjust/sdk-core/proguard-rules.pro
+10 −0 Adjust/sdk-plugin-criteo/build.gradle
+10 −0 Adjust/sdk-plugin-imei/build.gradle
+10 −0 Adjust/sdk-plugin-sociomantic/build.gradle
+10 −0 Adjust/sdk-plugin-trademob/build.gradle
+10 −0 Adjust/sdk-plugin-webbridge/build.gradle
+1 −1 Adjust/settings.gradle
+3 −2 README.md
+1 −1 doc/chinese/README.md
+2 −2 doc/english/web_views.md
+1 −1 doc/korean/README.md

0 comments on commit 36a2bed

Please sign in to comment.