Skip to content

Commit f7b50bb

Browse files
Merge pull request #103 from appodeal/release/3.5.2
[APDM-1127] Release Appodeal Unity Plugin v3.5.2
2 parents a1e3a22 + bd04fce commit f7b50bb

File tree

14 files changed

+2253
-262
lines changed

14 files changed

+2253
-262
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
*The full changelog can always be obtained at [Appodeal website](https://docs.appodeal.com/unity/changelog).*
66

7+
### 3.5.2 (April 15, 2025)
8+
9+
+ Updated Appodeal Android SDK to v3.5.2
10+
+ Updated Appodeal iOS SDK to v3.5.2
11+
+ Implemented selective dispatch for `LogEvent` public API method
12+
713
### 3.5.1 (April 01, 2025)
814

915
+ Updated Appodeal Android SDK to v3.5.1

Editor/DependencyManager/DefaultDependencies/AppodealDependencies.txt

Lines changed: 90 additions & 89 deletions
Large diffs are not rendered by default.

Runtime/Api/Appodeal.cs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -722,18 +722,23 @@ public static double GetPredictedEcpmForPlacement(int adType, string placement)
722722
}
723723

724724
/// <summary>
725-
/// <para>Sends event data to all connected analytic services such as Firebase, Adjust, AppsFlyer and Facebook.</para>
725+
/// Sends event data to selected analytic services such as Adjust, AppsFlyer, Facebook, or Firebase.<br/>
726726
/// See <see href="https://docs.appodeal.com/unity/advanced/event-tracking?distribution=upm#step-1-how-to-track-in-app-events"/> for more details.
727727
/// </summary>
728+
/// <param name="eventName">the name of the event.</param>
729+
/// <param name="eventParams">optional parameters associated with the event.</param>
730+
/// <param name="services">target services to send the event to. Defaults to all connected services.</param>
728731
/// <remarks>
729-
/// <para>Event parameter values must be one of the following types: <see langword="string"/>, <see langword="double"/>, or <see langword="int"/></para>
730-
/// If event has no params, call the shorten version of this method by passing only name of the event.
732+
/// For the <c>eventParams</c> argument, every dictionary value should be either a <c>string</c>, <c>double</c>, or <c>int</c>.<br/>
733+
/// Use the named argument <c>services:</c> if you want to specify target services while omitting the second optional argument.
731734
/// </remarks>
732-
/// <param name="eventName">name of the event.</param>
733-
/// <param name="eventParams">parameters of the event if any.</param>
734-
public static void LogEvent(string eventName, Dictionary<string, object> eventParams = null)
735+
/// <example>Send event to all connected services w/o params:<code>Appodeal.LogEvent("eventName");</code></example>
736+
/// <example>Send event to all connected services w/ params:<code>Appodeal.LogEvent("eventName", eventParams);</code></example>
737+
/// <example>Send event to a group of services w/o params:<code>Appodeal.LogEvent("eventName", services:AppodealService.AppsFlyer | AppodealService.Facebook);</code></example>
738+
/// <example>Send event to a specific service w/ params:<code>Appodeal.LogEvent("eventName", eventParams, AppodealService.Adjust);</code></example>
739+
public static void LogEvent(string eventName, Dictionary<string, object> eventParams = null, AppodealService services = AppodealService.All)
735740
{
736-
GetInstance().LogEvent(eventName, eventParams);
741+
GetInstance().LogEvent(eventName, eventParams, services);
737742
}
738743

739744
/// <summary>

Runtime/Common/AppodealEnums.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// ReSharper Disable CheckNamespace
22

3+
using System;
34
using System.Diagnostics.CodeAnalysis;
45

56
namespace AppodealStack.Monetization.Common
@@ -71,4 +72,14 @@ public enum MediationDebuggerProvider
7172
{
7273
AppLovinSdk,
7374
}
75+
76+
[Flags]
77+
public enum AppodealService
78+
{
79+
Adjust = 1 << 0,
80+
AppsFlyer = 1 << 1,
81+
Facebook = 1 << 2,
82+
Firebase = 1 << 3,
83+
All = Adjust | AppsFlyer | Facebook | Firebase
84+
}
7485
}

Runtime/Common/AppodealVersions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace AppodealStack.Monetization.Common
1212
[SuppressMessage("ReSharper", "UnusedMember.Global")]
1313
public static class AppodealVersions
1414
{
15-
private const string AppodealPluginVersion = "3.5.1";
15+
private const string AppodealPluginVersion = "3.5.2";
1616

1717
/// <summary>
1818
/// Gets the current version of the Appodeal Unity Plugin.

Runtime/Common/Interfaces/IAppodealAdsClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public interface IAppodealAdsClient
6868
void ResetExtraData(string key);
6969
double GetPredictedEcpm(int adType);
7070
double GetPredictedEcpmForPlacement(int adType, string placement);
71-
void LogEvent(string eventName, Dictionary<string, object> eventParams);
71+
void LogEvent(string eventName, Dictionary<string, object> eventParams, AppodealService services);
7272
void ValidatePlayStoreInAppPurchase(IPlayStoreInAppPurchase purchase, IInAppPurchaseValidationListener listener);
7373
void ValidateAppStoreInAppPurchase(IAppStoreInAppPurchase purchase, IInAppPurchaseValidationListener listener);
7474
void SetBidonEndpoint(string baseUrl);

Runtime/Platforms/Android/AndroidAppodealClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,11 @@ public bool IsAutoCacheEnabled(int adType)
430430
return AppodealJavaClass?.CallStatic<bool>(AndroidConstants.JavaMethodName.Appodeal.IsAutoCacheEnabled, AndroidAppodealHelper.GetJavaAdTypes(adType)) ?? false;
431431
}
432432

433-
public void LogEvent(string eventName, Dictionary<string, object> eventParams)
433+
public void LogEvent(string eventName, Dictionary<string, object> eventParams, AppodealService services)
434434
{
435435
if (eventParams == null)
436436
{
437-
AppodealJavaClass?.CallStatic(AndroidConstants.JavaMethodName.Appodeal.LogEvent, eventName, null);
437+
AppodealJavaClass?.CallStatic(AndroidConstants.JavaMethodName.Appodeal.LogEvent, eventName, null, (int)services);
438438
return;
439439
}
440440

@@ -451,7 +451,7 @@ public void LogEvent(string eventName, Dictionary<string, object> eventParams)
451451
map.Call<AndroidJavaObject>("put", entry.Key, AndroidAppodealHelper.GetJavaObject(entry.Value));
452452
}
453453

454-
AppodealJavaClass?.CallStatic(AndroidConstants.JavaMethodName.Appodeal.LogEvent, eventName, map);
454+
AppodealJavaClass?.CallStatic(AndroidConstants.JavaMethodName.Appodeal.LogEvent, eventName, map, (int)services);
455455
}
456456
catch (Exception e)
457457
{

Runtime/Platforms/Dummy/DummyAppodealClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ public string GetUserId()
824824
return String.Empty;
825825
}
826826

827-
public void LogEvent(string eventName, Dictionary<string, object> eventParams)
827+
public void LogEvent(string eventName, Dictionary<string, object> eventParams, AppodealService services)
828828
{
829829
if (CheckIfLoggingEnabled()) Debug.Log("Calling Appodeal.LogEvent method on an unsupported platform. Run your application on either Android or iOS device to test this method.");
830830
}

Runtime/Platforms/iOS/Bridge/AppodealObjCBridge.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ internal static class AppodealObjCBridge
183183
internal static extern bool AppodealIsAutoCacheEnabled(int adType);
184184

185185
[DllImport("__Internal")]
186-
internal static extern void AppodealLogEvent(string eventName, string eventParams);
186+
internal static extern void AppodealLogEvent(string eventName, string eventParams, int services);
187187

188188
[DllImport("__Internal")]
189189
internal static extern void AppodealValidateInAppPurchase(

Runtime/Platforms/iOS/IosAppodealClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,14 +745,14 @@ public void TrackInAppPurchase(double amount, string currency)
745745
AppodealObjCBridge.AppodealTrackInAppPurchase(amount, currency);
746746
}
747747

748-
public void LogEvent(string eventName, Dictionary<string, object> eventParams)
748+
public void LogEvent(string eventName, Dictionary<string, object> eventParams, AppodealService services)
749749
{
750750
var paramsFiltered = new Dictionary<string, object>();
751751

752752
eventParams?.Keys.Where(key => eventParams[key] is int || eventParams[key] is double || eventParams[key] is string)
753753
.ToList().ForEach(key => paramsFiltered.Add(key, eventParams[key]));
754754

755-
AppodealObjCBridge.AppodealLogEvent(eventName, DictionaryToString(paramsFiltered));
755+
AppodealObjCBridge.AppodealLogEvent(eventName, DictionaryToString(paramsFiltered), (int)services);
756756
}
757757

758758
public void ValidateAppStoreInAppPurchase(IAppStoreInAppPurchase purchase, IInAppPurchaseValidationListener listener)

0 commit comments

Comments
 (0)