diff --git a/sdk-intergration/Assets/AppsFlyer.meta b/sdk-intergration/Assets/AppsFlyer.meta
index 00aa988..2a71bd2 100644
--- a/sdk-intergration/Assets/AppsFlyer.meta
+++ b/sdk-intergration/Assets/AppsFlyer.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: da76ae4f9ba92124087139583d0dd929
+guid: 7863556d88b814e09ba9cfc75a91d655
folderAsset: yes
DefaultImporter:
externalObjects: {}
diff --git a/sdk-intergration/Assets/AppsFlyer/AFAdRevenueData.cs b/sdk-intergration/Assets/AppsFlyer/AFAdRevenueData.cs
new file mode 100644
index 0000000..64d53de
--- /dev/null
+++ b/sdk-intergration/Assets/AppsFlyer/AFAdRevenueData.cs
@@ -0,0 +1,71 @@
+using System;
+using System.Collections.Generic;
+
+namespace AppsFlyerSDK
+{
+ public enum MediationNetwork : ulong
+ {
+ GoogleAdMob = 1,
+ IronSource = 2,
+ ApplovinMax = 3,
+ Fyber = 4,
+ Appodeal = 5,
+ Admost = 6,
+ Topon = 7,
+ Tradplus = 8,
+ Yandex = 9,
+ ChartBoost = 10,
+ Unity = 11,
+ ToponPte = 12,
+ Custom = 13,
+ DirectMonetization = 14
+ }
+
+ public static class AdRevenueScheme
+ {
+ /**
+ * code ISO 3166-1 format
+ */
+ public const string COUNTRY = "country";
+
+ /**
+ * ID of the ad unit for the impression
+ */
+ public const string AD_UNIT = "ad_unit";
+
+ /**
+ * Format of the ad
+ */
+ public const string AD_TYPE = "ad_type";
+
+ /**
+ * ID of the ad placement for the impression
+ */
+ public const string PLACEMENT = "placement";
+ }
+
+ ///
+ // Data class representing ad revenue information.
+ //
+ // @property monetizationNetwork The name of the network that monetized the ad.
+ // @property mediationNetwork An instance of MediationNetwork representing the mediation service used.
+ // @property currencyIso4217Code The ISO 4217 currency code describing the currency of the revenue.
+ // @property eventRevenue The amount of revenue generated by the ad.
+ ///
+ public class AFAdRevenueData
+ {
+ public string monetizationNetwork { get; private set; }
+ public MediationNetwork mediationNetwork { get; private set; }
+ public string currencyIso4217Code { get; private set; }
+ public double eventRevenue { get; private set; }
+
+ public AFAdRevenueData(string monetization, MediationNetwork mediation, string currency, double revenue)
+ {
+ monetizationNetwork = monetization;
+ mediationNetwork = mediation;
+ currencyIso4217Code = currency;
+ eventRevenue = revenue;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/sdk-intergration/Assets/AppsFlyer/Tests/Tests_Suite.cs.meta b/sdk-intergration/Assets/AppsFlyer/AFAdRevenueData.cs.meta
similarity index 83%
rename from sdk-intergration/Assets/AppsFlyer/Tests/Tests_Suite.cs.meta
rename to sdk-intergration/Assets/AppsFlyer/AFAdRevenueData.cs.meta
index c20a62c..3106aae 100644
--- a/sdk-intergration/Assets/AppsFlyer/Tests/Tests_Suite.cs.meta
+++ b/sdk-intergration/Assets/AppsFlyer/AFAdRevenueData.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 1b1a24aa01166451d804d7c03c14a3db
+guid: 49e1906ae949e4bfea400bd1da9f7e39
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/sdk-intergration/Assets/AppsFlyer/AFAdRevenueEvent.cs b/sdk-intergration/Assets/AppsFlyer/AFAdRevenueEvent.cs
deleted file mode 100644
index 6ed2afb..0000000
--- a/sdk-intergration/Assets/AppsFlyer/AFAdRevenueEvent.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System.Collections;
-using UnityEngine;
-
-public class AFAdRevenueEvent {
-
- /**
- *Pre-defined keys for non-mandatory dictionary
- *Code ISO 3166-1 format
- **/
- public const string COUNTRY = "country";
-
- /**
- *ID of the ad unit for the impression
- **/
- public const string AD_UNIT = "ad_unit";
-
- /**
- *Format of the ad
- **/
- public const string AD_TYPE = "ad_type";
-
- /**
- *ID of the ad placement for the impression
- **/
- public const string PLACEMENT = "placement";
-
- /**
- *Provided by Facebook Audience Network only, and will be reported to publishers
- *approved by Facebook Audience Network within the closed beta
- **/
- public const string ECPM_PAYLOAD = "ecpm_payload";
-
-
-}
diff --git a/sdk-intergration/Assets/AppsFlyer/AFInAppEvents.cs b/sdk-intergration/Assets/AppsFlyer/AFInAppEvents.cs
index daa7602..1f6d1fe 100644
--- a/sdk-intergration/Assets/AppsFlyer/AFInAppEvents.cs
+++ b/sdk-intergration/Assets/AppsFlyer/AFInAppEvents.cs
@@ -28,7 +28,6 @@ public class AFInAppEvents {
public const string LOCATION_CHANGED = "af_location_changed";
public const string LOCATION_COORDINATES = "af_location_coordinates";
public const string ORDER_ID = "af_order_id";
- public const string GA = "af_ga_event";
/**
* Event Parameter Name
* **/
diff --git a/sdk-intergration/Assets/AppsFlyer/AFMiniJSON.cs b/sdk-intergration/Assets/AppsFlyer/AFMiniJSON.cs
old mode 100644
new mode 100755
diff --git a/sdk-intergration/Assets/AppsFlyer/AFPurchaseDetailsAndroid.cs b/sdk-intergration/Assets/AppsFlyer/AFPurchaseDetailsAndroid.cs
index 6762c97..d149885 100644
--- a/sdk-intergration/Assets/AppsFlyer/AFPurchaseDetailsAndroid.cs
+++ b/sdk-intergration/Assets/AppsFlyer/AFPurchaseDetailsAndroid.cs
@@ -10,24 +10,19 @@ namespace AppsFlyerSDK
}
///
- //
+ /// Purchase details class matching Android SDK AFPurchaseDetails
///
public class AFPurchaseDetailsAndroid
-
{
public AFPurchaseType purchaseType { get; private set; }
public string purchaseToken { get; private set; }
public string productId { get; private set; }
- public string price { get; private set; }
- public string currency { get; private set; }
- public AFPurchaseDetailsAndroid(AFPurchaseType type, String purchaseToken, String productId, String price, String currency)
+ public AFPurchaseDetailsAndroid(AFPurchaseType type, String purchaseToken, String productId)
{
this.purchaseType = type;
this.purchaseToken = purchaseToken;
this.productId = productId;
- this.price = price;
- this.currency = currency;
}
}
diff --git a/sdk-intergration/Assets/AppsFlyer/AFSDKPurchaseDetailsIOS.cs b/sdk-intergration/Assets/AppsFlyer/AFSDKPurchaseDetailsIOS.cs
index f159eea..0dcde3a 100644
--- a/sdk-intergration/Assets/AppsFlyer/AFSDKPurchaseDetailsIOS.cs
+++ b/sdk-intergration/Assets/AppsFlyer/AFSDKPurchaseDetailsIOS.cs
@@ -4,26 +4,33 @@ using System.Collections.Generic;
namespace AppsFlyerSDK
{
///
- //
+ /// Purchase type enum matching iOS SDK AFSDKPurchaseType
+ ///
+ public enum AFSDKPurchaseType
+ {
+ Subscription,
+ OneTimePurchase
+ }
+
+ ///
+ /// Purchase details class matching iOS SDK AFSDKPurchaseDetails
///
public class AFSDKPurchaseDetailsIOS
{
public string productId { get; private set; }
- public string price { get; private set; }
- public string currency { get; private set; }
public string transactionId { get; private set; }
+ public AFSDKPurchaseType purchaseType { get; private set; }
- private AFSDKPurchaseDetailsIOS(string productId, string price, string currency, string transactionId)
+ private AFSDKPurchaseDetailsIOS(string productId, string transactionId, AFSDKPurchaseType purchaseType)
{
this.productId = productId;
- this.price = price;
- this.currency = currency;
this.transactionId = transactionId;
+ this.purchaseType = purchaseType;
}
- public static AFSDKPurchaseDetailsIOS Init(string productId, string price, string currency, string transactionId)
+ public static AFSDKPurchaseDetailsIOS Init(string productId, string transactionId, AFSDKPurchaseType purchaseType)
{
- return new AFSDKPurchaseDetailsIOS(productId, price, currency, transactionId);
+ return new AFSDKPurchaseDetailsIOS(productId, transactionId, purchaseType);
}
}
diff --git a/sdk-intergration/Assets/AppsFlyer/AppsFlyer.cs b/sdk-intergration/Assets/AppsFlyer/AppsFlyer.cs
index 670932a..f2f3678 100644
--- a/sdk-intergration/Assets/AppsFlyer/AppsFlyer.cs
+++ b/sdk-intergration/Assets/AppsFlyer/AppsFlyer.cs
@@ -6,8 +6,7 @@ namespace AppsFlyerSDK
{
public class AppsFlyer : MonoBehaviour
{
-
- public static readonly string kAppsFlyerPluginVersion = "6.14.3";
+ public static readonly string kAppsFlyerPluginVersion = "6.17.7";
public static string CallBackObjectName = null;
private static EventHandler onRequestResponse;
private static EventHandler onInAppResponse;
@@ -333,6 +332,19 @@ namespace AppsFlyerSDK
}
}
+ ///
+ /// Logs ad revenue data along with additional parameters if provided.
+ ///
+ /// instance of AFAdRevenueData containing ad revenue information.
+ /// An optional map of additional parameters to be logged with ad revenue data. This can be null if there are no additional parameters.
+ public static void logAdRevenue(AFAdRevenueData adRevenueData, Dictionary additionalParameters)
+ {
+ if (instance != null)
+ {
+ instance.logAdRevenue(adRevenueData, additionalParameters);
+ }
+ }
+
///
/// Manually record the location of the user.
///
@@ -766,12 +778,12 @@ namespace AppsFlyerSDK
}
// V2
- public static void validateAndSendInAppPurchase(AFSDKPurchaseDetailsIOS details, Dictionary extraEventValues, MonoBehaviour gameObject)
+ public static void validateAndSendInAppPurchase(AFSDKPurchaseDetailsIOS details, Dictionary purchaseAdditionalDetails, MonoBehaviour gameObject)
{
if (instance != null && instance is IAppsFlyerIOSBridge)
{
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
- appsFlyeriOSInstance.validateAndSendInAppPurchase(details, extraEventValues, gameObject);
+ appsFlyeriOSInstance.validateAndSendInAppPurchase(details, purchaseAdditionalDetails, gameObject);
}
}
@@ -785,12 +797,12 @@ namespace AppsFlyerSDK
}
// V2
- public static void validateAndSendInAppPurchase(AFPurchaseDetailsAndroid details, Dictionary additionalParameters, MonoBehaviour gameObject)
+ public static void validateAndSendInAppPurchase(AFPurchaseDetailsAndroid details, Dictionary purchaseAdditionalDetails, MonoBehaviour gameObject)
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
- appsFlyerAndroidInstance.validateAndSendInAppPurchase(details, additionalParameters, gameObject);
+ appsFlyerAndroidInstance.validateAndSendInAppPurchase(details, purchaseAdditionalDetails, gameObject);
}
}
diff --git a/sdk-intergration/Assets/AppsFlyer/AppsFlyerAdRevenue.cs b/sdk-intergration/Assets/AppsFlyer/AppsFlyerAdRevenue.cs
deleted file mode 100644
index 1c9baf1..0000000
--- a/sdk-intergration/Assets/AppsFlyer/AppsFlyerAdRevenue.cs
+++ /dev/null
@@ -1,178 +0,0 @@
-using System.Collections.Generic;
-using UnityEngine;
-using System.Runtime.InteropServices;
-using System;
-
-namespace AppsFlyerSDK
-{
- public class AppsFlyerAdRevenue : MonoBehaviour
- {
-
- public static readonly string kAppsFlyerAdRevenueVersion = "6.14.3";
-
-#if UNITY_ANDROID && !UNITY_EDITOR
- private static AndroidJavaClass appsFlyerAndroid = new AndroidJavaClass("com.appsflyer.unity.afunityadrevenuegenericplugin.AdRevenueUnityWrapper");
-#endif
-
- public static void start()
- {
-#if UNITY_IOS && !UNITY_EDITOR
-
- _start();
-
-#elif UNITY_ANDROID && !UNITY_EDITOR
-
- using(AndroidJavaClass cls_UnityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) {
-
- using(AndroidJavaObject cls_Activity = cls_UnityPlayer.GetStatic("currentActivity")) {
-
- AndroidJavaObject cls_Application = cls_Activity.Call("getApplication");
-
- appsFlyerAndroid.CallStatic("start", cls_Application);
- }
- }
-
-#else
-
-#endif
- }
-
-
- public static void setIsDebug(bool isDebug)
- {
-#if UNITY_IOS && !UNITY_EDITOR
- _setIsDebugAdrevenue(isDebug);
-#elif UNITY_ANDROID && !UNITY_EDITOR
-
-#else
-
-#endif
- }
-
- public static void logAdRevenue(string monetizationNetwork,
- AppsFlyerAdRevenueMediationNetworkType mediationNetwork,
- double eventRevenue,
- string revenueCurrency,
- Dictionary additionalParameters)
- {
-#if UNITY_IOS && !UNITY_EDITOR
-
- _logAdRevenue(monetizationNetwork, mediationNetwork, eventRevenue, revenueCurrency, AFMiniJSON.Json.Serialize(additionalParameters));
-
-#elif UNITY_ANDROID && !UNITY_EDITOR
-
- int mediationNetworkAndroid = setMediationNetworkTypeAndroid(mediationNetwork);
- if (mediationNetworkAndroid == -1)
- {
- Debug.Log("Please choose a valid mediationNetwork");
- } else
- {
- appsFlyerAndroid.CallStatic("logAdRevenue",
- monetizationNetwork,
- mediationNetworkAndroid,
- revenueCurrency,
- eventRevenue,
- convertDictionaryToJavaMap(additionalParameters));
-
- }
-#else
-
-#endif
- }
-
-#if UNITY_IOS && !UNITY_EDITOR
-
- [DllImport("__Internal")]
- private static extern void _start();
-
- [DllImport("__Internal")]
- private static extern void _setIsDebugAdrevenue(bool isDebug);
-
- [DllImport("__Internal")]
- private static extern void _logAdRevenue(string monetizationNetwork,
- AppsFlyerAdRevenueMediationNetworkType mediationNetwork,
- double eventRevenue,
- string revenueCurrency,
- string additionalParameters);
-
-#elif UNITY_ANDROID && !UNITY_EDITOR
-
-#else
-
-#endif
- private static int setMediationNetworkTypeAndroid(AppsFlyerAdRevenueMediationNetworkType mediationNetwork)
- {
- switch (mediationNetwork)
- {
- case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeIronSource:
- return 0;
- case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeApplovinMax:
- return 1;
- case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeGoogleAdMob:
- return 2;
- case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeFyber:
- return 3;
- case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeAppodeal:
- return 4;
- case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeAdmost:
- return 5;
- case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeTopon:
- return 6;
- case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeTradplus:
- return 7;
- case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeYandex:
- return 8;
- case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeChartBoost:
- return 9;
- case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeUnity:
- return 10;
- case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeCustomMediation:
- return 11;
- case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypedirectMonetization:
- return 12;
- default:
- return -1;
- }
-
- }
- private static AndroidJavaObject convertDictionaryToJavaMap(Dictionary dictionary)
- {
- AndroidJavaObject map = new AndroidJavaObject("java.util.HashMap");
- IntPtr putMethod = AndroidJNIHelper.GetMethodID(map.GetRawClass(), "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
- jvalue[] val;
- if (dictionary != null)
- {
- foreach (var entry in dictionary)
- {
- val = AndroidJNIHelper.CreateJNIArgArray(new object[] { entry.Key, entry.Value });
- AndroidJNI.CallObjectMethod(map.GetRawObject(), putMethod, val);
- AndroidJNI.DeleteLocalRef(val[0].l);
- AndroidJNI.DeleteLocalRef(val[1].l);
- }
- }
-
- return map;
- }
- }
-
-
- public enum AppsFlyerAdRevenueMediationNetworkType
- {
- AppsFlyerAdRevenueMediationNetworkTypeGoogleAdMob = 1,
- AppsFlyerAdRevenueMediationNetworkTypeIronSource = 2,
- AppsFlyerAdRevenueMediationNetworkTypeApplovinMax = 3,
- AppsFlyerAdRevenueMediationNetworkTypeFyber = 4,
- AppsFlyerAdRevenueMediationNetworkTypeAppodeal = 5,
- AppsFlyerAdRevenueMediationNetworkTypeAdmost = 6,
- AppsFlyerAdRevenueMediationNetworkTypeTopon = 7,
- AppsFlyerAdRevenueMediationNetworkTypeTradplus = 8,
- AppsFlyerAdRevenueMediationNetworkTypeYandex = 9,
- AppsFlyerAdRevenueMediationNetworkTypeChartBoost = 10,
- AppsFlyerAdRevenueMediationNetworkTypeUnity = 11,
- AppsFlyerAdRevenueMediationNetworkTypeCustomMediation = 12,
- AppsFlyerAdRevenueMediationNetworkTypedirectMonetization = 13
- }
-
-
-
-}
\ No newline at end of file
diff --git a/sdk-intergration/Assets/AppsFlyer/AppsFlyerAndroid.cs b/sdk-intergration/Assets/AppsFlyer/AppsFlyerAndroid.cs
index 0e085f6..695b4a2 100644
--- a/sdk-intergration/Assets/AppsFlyer/AppsFlyerAndroid.cs
+++ b/sdk-intergration/Assets/AppsFlyer/AppsFlyerAndroid.cs
@@ -398,7 +398,23 @@ namespace AppsFlyerSDK
public void setConsentData(AppsFlyerConsent appsFlyerConsent)
{
#if !UNITY_EDITOR
- appsFlyerAndroid.CallStatic("setConsentData", appsFlyerConsent.isUserSubjectToGDPR, appsFlyerConsent.hasConsentForDataUsage, appsFlyerConsent.hasConsentForAdsPersonalization);
+ string isUserSubjectToGDPR = appsFlyerConsent.isUserSubjectToGDPR?.ToString().ToLower() ?? "null";
+ string hasConsentForDataUsage = appsFlyerConsent.hasConsentForDataUsage?.ToString().ToLower() ?? "null";
+ string hasConsentForAdsPersonalization = appsFlyerConsent.hasConsentForAdsPersonalization?.ToString().ToLower() ?? "null";
+ string hasConsentForAdStorage = appsFlyerConsent.hasConsentForAdStorage?.ToString().ToLower() ?? "null";
+
+ appsFlyerAndroid.CallStatic("setConsentData", isUserSubjectToGDPR, hasConsentForDataUsage, hasConsentForAdsPersonalization, hasConsentForAdStorage);
+#endif
+ }
+
+ ///
+ /// Logs ad revenue data along with additional parameters if provided.
+ /// instance of AFAdRevenueData containing ad revenue information.
+ /// An optional map of additional parameters to be logged with ad revenue data. This can be null if there are no additional parameters.
+ public void logAdRevenue(AFAdRevenueData adRevenueData, Dictionary additionalParameters)
+ {
+#if !UNITY_EDITOR
+ appsFlyerAndroid.CallStatic("logAdRevenue", adRevenueData.monetizationNetwork, getMediationNetwork(adRevenueData.mediationNetwork), adRevenueData.currencyIso4217Code, adRevenueData.eventRevenue, convertDictionaryToJavaMap(additionalParameters));
#endif
}
@@ -489,11 +505,11 @@ namespace AppsFlyerSDK
/// An af_purchase event with the relevant values will be automatically sent if the validation is successful.
///
/// AFPurchaseDetailsAndroid instance.
- /// additionalParameters Freehand parameters to be sent with the purchase (if validated).
- public void validateAndSendInAppPurchase(AFPurchaseDetailsAndroid details, Dictionary additionalParameters, MonoBehaviour gameObject)
+ /// purchaseAdditionalDetails Freehand parameters to be sent with the purchase (if validated).
+ public void validateAndSendInAppPurchase(AFPurchaseDetailsAndroid details, Dictionary purchaseAdditionalDetails, MonoBehaviour gameObject)
{
#if !UNITY_EDITOR
- appsFlyerAndroid.CallStatic("validateAndTrackInAppPurchaseV2", (int)details.purchaseType, details.purchaseToken, details.productId, details.price, details.currency, convertDictionaryToJavaMap(additionalParameters), gameObject ? gameObject.name : null);
+ appsFlyerAndroid.CallStatic("validateAndTrackInAppPurchaseV2", (int)details.purchaseType, details.purchaseToken, details.productId, convertDictionaryToJavaMap(purchaseAdditionalDetails), gameObject ? gameObject.name : null);
#endif
}
@@ -749,6 +765,65 @@ namespace AppsFlyerSDK
return emailsCryptType;
}
+ ///
+ /// Internal Helper Method.
+ ///
+ private static AndroidJavaObject getMediationNetwork(MediationNetwork mediationNetwork)
+ {
+ AndroidJavaClass mediationNetworkEnumClass = new AndroidJavaClass("com.appsflyer.MediationNetwork");
+ AndroidJavaObject mediationNetworkObject;
+
+ switch (mediationNetwork)
+ {
+ case MediationNetwork.IronSource:
+ mediationNetworkObject = mediationNetworkEnumClass.GetStatic("IRONSOURCE");
+ break;
+ case MediationNetwork.ApplovinMax:
+ mediationNetworkObject = mediationNetworkEnumClass.GetStatic("APPLOVIN_MAX");
+ break;
+ case MediationNetwork.GoogleAdMob:
+ mediationNetworkObject = mediationNetworkEnumClass.GetStatic("GOOGLE_ADMOB");
+ break;
+ case MediationNetwork.Fyber:
+ mediationNetworkObject = mediationNetworkEnumClass.GetStatic("FYBER");
+ break;
+ case MediationNetwork.Appodeal:
+ mediationNetworkObject = mediationNetworkEnumClass.GetStatic("APPODEAL");
+ break;
+ case MediationNetwork.Admost:
+ mediationNetworkObject = mediationNetworkEnumClass.GetStatic("ADMOST");
+ break;
+ case MediationNetwork.Topon:
+ mediationNetworkObject = mediationNetworkEnumClass.GetStatic("TOPON");
+ break;
+ case MediationNetwork.Tradplus:
+ mediationNetworkObject = mediationNetworkEnumClass.GetStatic("TRADPLUS");
+ break;
+ case MediationNetwork.Yandex:
+ mediationNetworkObject = mediationNetworkEnumClass.GetStatic("YANDEX");
+ break;
+ case MediationNetwork.ChartBoost:
+ mediationNetworkObject = mediationNetworkEnumClass.GetStatic("CHARTBOOST");
+ break;
+ case MediationNetwork.Unity:
+ mediationNetworkObject = mediationNetworkEnumClass.GetStatic("UNITY");
+ break;
+ case MediationNetwork.ToponPte:
+ mediationNetworkObject = mediationNetworkEnumClass.GetStatic("TOPON_PTE");
+ break;
+ case MediationNetwork.Custom:
+ mediationNetworkObject = mediationNetworkEnumClass.GetStatic("CUSTOM_MEDIATION");
+ break;
+ case MediationNetwork.DirectMonetization:
+ mediationNetworkObject = mediationNetworkEnumClass.GetStatic("DIRECT_MONETIZATION_NETWORK");
+ break;
+ default:
+ mediationNetworkObject = mediationNetworkEnumClass.GetStatic("NONE");
+ break;
+ }
+ return mediationNetworkObject;
+ }
+
///
/// Internal Helper Method.
///
@@ -771,9 +846,6 @@ namespace AppsFlyerSDK
return map;
}
}
-
#endif
-
-
}
\ No newline at end of file
diff --git a/sdk-intergration/Assets/AppsFlyer/AppsFlyerConsent.cs b/sdk-intergration/Assets/AppsFlyer/AppsFlyerConsent.cs
index 341e530..feb448d 100644
--- a/sdk-intergration/Assets/AppsFlyer/AppsFlyerConsent.cs
+++ b/sdk-intergration/Assets/AppsFlyer/AppsFlyerConsent.cs
@@ -10,26 +10,45 @@ namespace AppsFlyerSDK
// This class should be used to notify and record the user's applicability
// under GDPR, their general consent to data usage, and their consent to personalized
// advertisements based on user data.
-
- // Note that the consent for data usage and ads personalization pair is only applicable when the user is
- // subject to GDPR guidelines. Therefore, the following factory methods should be used accordingly:
- // - Use [forGDPRUser] when the user is subject to GDPR.
- // - Use [forNonGDPRUser] when the user is not subject to GDPR.
- // @property isUserSubjectToGDPR Indicates whether GDPR regulations apply to the user (true if the user is
- // a subject of GDPR). It also serves as a flag for compliance with relevant aspects of DMA regulations.
- // @property hasConsentForDataUsage Indicates whether the user has consented to the use of their data for advertising
- // purposes under both GDPR and DMA guidelines (true if the user has consented, nullable if not subject to GDPR).
- // @property hasConsentForAdsPersonalization Indicates whether the user has consented to the use of their data for
- // personalized advertising within the boundaries of GDPR and DMA rules (true if the user has consented to
- // personalized ads, nullable if not subject to GDPR).
+ /// ## Properties:
+ /// - `isUserSubjectToGDPR` (optional) - Indicates whether GDPR regulations apply to the user.
+ /// This may also serve as a general compliance flag for other regional regulations.
+ /// - `hasConsentForDataUsage` (optional) - Indicates whether the user consents to the processing
+ /// of their data for advertising purposes.
+ /// - `hasConsentForAdsPersonalization` (optional) - Indicates whether the user consents to the
+ /// use of their data for personalized advertising.
+ /// - `hasConsentForAdStorage` (optional) - Indicates whether the user consents to ad-related storage access.
+ ///
+ /// **Usage Example:**
+ /// ```csharp
+ /// var consent = new AppsFlyerConsent(
+ /// isUserSubjectToGDPR: true,
+ /// hasConsentForDataUsage: true,
+ /// hasConsentForAdsPersonalization: false,
+ /// hasConsentForAdStorage: true
+ /// );
+ /// **Deprecated APIs:**
+ /// - `ForGDPRUser(...)` and `ForNonGDPRUser(...)` should no longer be used.
+ /// - Use `new AppsFlyerConsent(...)` instead with relevant consent fields.
+ ///
///
public class AppsFlyerConsent
{
- public bool isUserSubjectToGDPR { get; private set; }
- public bool hasConsentForDataUsage { get; private set; }
- public bool hasConsentForAdsPersonalization { get; private set; }
+ public bool? isUserSubjectToGDPR { get; private set; }
+ public bool? hasConsentForDataUsage { get; private set; }
+ public bool? hasConsentForAdsPersonalization { get; private set; }
+ public bool? hasConsentForAdStorage { get; private set; }
+ public AppsFlyerConsent( bool? isUserSubjectToGDPR = null, bool? hasConsentForDataUsage = null, bool? hasConsentForAdsPersonalization = null, bool? hasConsentForAdStorage = null)
+ {
+ this.isUserSubjectToGDPR = isUserSubjectToGDPR;
+ this.hasConsentForDataUsage = hasConsentForDataUsage;
+ this.hasConsentForAdsPersonalization = hasConsentForAdsPersonalization;
+ this.hasConsentForAdStorage = hasConsentForAdStorage;
+ }
+
+ [Obsolete("Use the new constructor with optional booleans instead.")]
private AppsFlyerConsent(bool isGDPR, bool hasForDataUsage, bool hasForAdsPersonalization)
{
isUserSubjectToGDPR = isGDPR;
@@ -37,15 +56,16 @@ namespace AppsFlyerSDK
hasConsentForAdsPersonalization = hasForAdsPersonalization;
}
+ [Obsolete("Use new AppsFlyerConsent(...) instead.")]
public static AppsFlyerConsent ForGDPRUser(bool hasConsentForDataUsage, bool hasConsentForAdsPersonalization)
{
return new AppsFlyerConsent(true, hasConsentForDataUsage, hasConsentForAdsPersonalization);
}
+ [Obsolete("Use new AppsFlyerConsent(...) instead.")]
public static AppsFlyerConsent ForNonGDPRUser()
{
- return new AppsFlyerConsent(false, false, false);
+ return new AppsFlyerConsent(false);
}
}
-
}
\ No newline at end of file
diff --git a/sdk-intergration/Assets/AppsFlyer/AppsFlyerPurchaseConnector.cs b/sdk-intergration/Assets/AppsFlyer/AppsFlyerPurchaseConnector.cs
new file mode 100644
index 0000000..ee43009
--- /dev/null
+++ b/sdk-intergration/Assets/AppsFlyer/AppsFlyerPurchaseConnector.cs
@@ -0,0 +1,426 @@
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using UnityEngine;
+using System;
+
+namespace AppsFlyerSDK
+{
+
+ public interface IAppsFlyerPurchaseRevenueDataSource
+ {
+ Dictionary PurchaseRevenueAdditionalParametersForProducts(HashSet