接入外部sdk
This commit is contained in:
@@ -6,14 +6,14 @@ namespace AppsFlyerSDK
|
||||
{
|
||||
public class AppsFlyer : MonoBehaviour
|
||||
{
|
||||
public static readonly string kAppsFlyerPluginVersion = "6.14.5";
|
||||
public static readonly string kAppsFlyerPluginVersion = "6.17.91";
|
||||
public static string CallBackObjectName = null;
|
||||
private static EventHandler onRequestResponse;
|
||||
private static EventHandler onInAppResponse;
|
||||
private static EventHandler onDeepLinkReceived;
|
||||
public static IAppsFlyerNativeBridge instance = null;
|
||||
public delegate void unityCallBack(string message);
|
||||
public static string currType = "USD";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the AppsFlyer SDK with your devKey and appID.
|
||||
@@ -317,7 +317,6 @@ namespace AppsFlyerSDK
|
||||
instance.setCurrencyCode(currencyCode);
|
||||
#else
|
||||
#endif
|
||||
if(currencyCode!="") currType = currencyCode;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,6 +332,19 @@ namespace AppsFlyerSDK
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs ad revenue data along with additional parameters if provided.
|
||||
/// </summary>
|
||||
/// <param name = "adRevenueData" >instance of AFAdRevenueData containing ad revenue information.</param>
|
||||
/// <param name = "additionalParameters" >An optional map of additional parameters to be logged with ad revenue data. This can be null if there are no additional parameters.</param>
|
||||
public static void logAdRevenue(AFAdRevenueData adRevenueData, Dictionary<string, string> additionalParameters)
|
||||
{
|
||||
if (instance != null)
|
||||
{
|
||||
instance.logAdRevenue(adRevenueData, additionalParameters);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Manually record the location of the user.
|
||||
/// </summary>
|
||||
@@ -756,6 +768,11 @@ namespace AppsFlyerSDK
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [Deprecated] Validates an in-app purchase on iOS.
|
||||
/// Use the V2 overload with AFSDKPurchaseDetailsIOS instead.
|
||||
/// </summary>
|
||||
[System.Obsolete("This method is deprecated. Use validateAndSendInAppPurchase(AFSDKPurchaseDetailsIOS details, Dictionary<string, string> purchaseAdditionalDetails, MonoBehaviour gameObject) instead.")]
|
||||
public static void validateAndSendInAppPurchase(string productIdentifier, string price, string currency, string transactionId, Dictionary<string, string> additionalParameters, MonoBehaviour gameObject)
|
||||
{
|
||||
if (instance != null && instance is IAppsFlyerIOSBridge)
|
||||
@@ -765,16 +782,23 @@ namespace AppsFlyerSDK
|
||||
}
|
||||
}
|
||||
|
||||
// V2
|
||||
public static void validateAndSendInAppPurchase(AFSDKPurchaseDetailsIOS details, Dictionary<string, string> extraEventValues, MonoBehaviour gameObject)
|
||||
/// <summary>
|
||||
/// Validates an in-app purchase on iOS using the V2 API.
|
||||
/// </summary>
|
||||
public static void validateAndSendInAppPurchase(AFSDKPurchaseDetailsIOS details, Dictionary<string, string> purchaseAdditionalDetails, MonoBehaviour gameObject)
|
||||
{
|
||||
if (instance != null && instance is IAppsFlyerIOSBridge)
|
||||
{
|
||||
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
|
||||
appsFlyeriOSInstance.validateAndSendInAppPurchase(details, extraEventValues, gameObject);
|
||||
appsFlyeriOSInstance.validateAndSendInAppPurchase(details, purchaseAdditionalDetails, gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [Deprecated] Validates an in-app purchase on Android.
|
||||
/// Use the V2 overload with AFPurchaseDetailsAndroid instead.
|
||||
/// </summary>
|
||||
[System.Obsolete("This method is deprecated. Use validateAndSendInAppPurchase(AFPurchaseDetailsAndroid details, Dictionary<string, string> purchaseAdditionalDetails, MonoBehaviour gameObject) instead.")]
|
||||
public static void validateAndSendInAppPurchase(string publicKey, string signature, string purchaseData, string price, string currency, Dictionary<string, string> additionalParameters, MonoBehaviour gameObject)
|
||||
{
|
||||
if (instance != null && instance is IAppsFlyerAndroidBridge)
|
||||
@@ -784,13 +808,15 @@ namespace AppsFlyerSDK
|
||||
}
|
||||
}
|
||||
|
||||
// V2
|
||||
public static void validateAndSendInAppPurchase(AFPurchaseDetailsAndroid details, Dictionary<string, string> additionalParameters, MonoBehaviour gameObject)
|
||||
/// <summary>
|
||||
/// Validates an in-app purchase on Android using the V2 API.
|
||||
/// </summary>
|
||||
public static void validateAndSendInAppPurchase(AFPurchaseDetailsAndroid details, Dictionary<string, string> purchaseAdditionalDetails, MonoBehaviour gameObject)
|
||||
{
|
||||
if (instance != null && instance is IAppsFlyerAndroidBridge)
|
||||
{
|
||||
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
|
||||
appsFlyerAndroidInstance.validateAndSendInAppPurchase(details, additionalParameters, gameObject);
|
||||
appsFlyerAndroidInstance.validateAndSendInAppPurchase(details, purchaseAdditionalDetails, gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user