public static void start(AdTraceConfig adtraceConfig) { if (IsEditor()) { return; } if (adtraceConfig == null) { Debug.Log("AdTrace: Missing config to start."); return; } #if UNITY_IOS AdTrace.eventSuccessDelegate = adtraceConfig.getEventSuccessDelegate(); AdTrace.eventFailureDelegate = adtraceConfig.getEventFailureDelegate(); AdTrace.sessionSuccessDelegate = adtraceConfig.getSessionSuccessDelegate(); AdTrace.sessionFailureDelegate = adtraceConfig.getSessionFailureDelegate(); AdTrace.deferredDeeplinkDelegate = adtraceConfig.getDeferredDeeplinkDelegate(); AdTrace.attributionChangedDelegate = adtraceConfig.getAttributionChangedDelegate(); AdTraceiOS.Start(adtraceConfig); #elif UNITY_ANDROID AdTraceAndroid.Start(adtraceConfig); #else Debug.Log(errorMsgPlatform); #endif }
public static void gdprForgetMe() { #if UNITY_IOS AdTraceiOS.GdprForgetMe(); #elif UNITY_ANDROID AdTraceAndroid.GdprForgetMe(); #else Debug.Log(errorMsgPlatform); #endif }
public static void addSessionCallbackParameter(string key, string value) { if (IsEditor()) { return; } #if UNITY_IOS AdTraceiOS.AddSessionCallbackParameter(key, value); #elif UNITY_ANDROID AdTraceAndroid.AddSessionCallbackParameter(key, value); #else Debug.Log(errorMsgPlatform); #endif }
public static void sendFirstPackages() { if (IsEditor()) { return; } #if UNITY_IOS AdTraceiOS.SendFirstPackages(); #elif UNITY_ANDROID AdTraceAndroid.SendFirstPackages(); #else Debug.Log(errorMsgPlatform); #endif }
public static void appWillOpenUrl(string url) { if (IsEditor()) { return; } #if UNITY_IOS AdTraceiOS.AppWillOpenUrl(url); #elif UNITY_ANDROID AdTraceAndroid.AppWillOpenUrl(url); #else Debug.Log(errorMsgPlatform); #endif }
public static void setDeviceToken(string deviceToken) { if (IsEditor()) { return; } #if UNITY_IOS AdTraceiOS.SetDeviceToken(deviceToken); #elif UNITY_ANDROID AdTraceAndroid.SetDeviceToken(deviceToken); #else Debug.Log(errorMsgPlatform); #endif }
public static void setOfflineMode(bool enabled) { if (IsEditor()) { return; } #if UNITY_IOS AdTraceiOS.SetOfflineMode(enabled); #elif UNITY_ANDROID AdTraceAndroid.SetOfflineMode(enabled); #else Debug.Log(errorMsgPlatform); #endif }
public static void removeSessionPartnerParameter(string key) { if (IsEditor()) { return; } #if UNITY_IOS AdTraceiOS.RemoveSessionPartnerParameter(key); #elif UNITY_ANDROID AdTraceAndroid.RemoveSessionPartnerParameter(key); #else Debug.Log(errorMsgPlatform); #endif }
public static void resetSessionCallbackParameters() { if (IsEditor()) { return; } #if UNITY_IOS AdTraceiOS.ResetSessionCallbackParameters(); #elif UNITY_ANDROID AdTraceAndroid.ResetSessionCallbackParameters(); #else Debug.Log(errorMsgPlatform); #endif }
public static void SetTestOptions(Dictionary <string, string> testOptions) { if (IsEditor()) { return; } #if UNITY_IOS AdTraceiOS.SetTestOptions(testOptions); #elif UNITY_ANDROID AdTraceAndroid.SetTestOptions(testOptions); #else Debug.Log("Cannot run integration tests. None of the supported platforms selected."); #endif }
public static void setReferrer(string referrer) { if (IsEditor()) { return; } #if UNITY_IOS Debug.Log("AdTrace: Install referrer is not available on iOS platform."); #elif UNITY_ANDROID AdTraceAndroid.SetReferrer(referrer); #else Debug.Log(errorMsgPlatform); #endif }
public static string getSdkVersion() { if (IsEditor()) { return(string.Empty); } #if UNITY_IOS return(AdTraceiOS.GetSdkVersion()); #elif UNITY_ANDROID return(AdTraceAndroid.GetSdkVersion()); #else Debug.Log(errorMsgPlatform); return(string.Empty); #endif }
public static AdTraceAttribution getAttribution() { if (IsEditor()) { return(null); } #if UNITY_IOS return(AdTraceiOS.GetAttribution()); #elif UNITY_ANDROID return(AdTraceAndroid.GetAttribution()); #else Debug.Log(errorMsgPlatform); return(null); #endif }
public static bool isEnabled() { if (IsEditor()) { return(false); } #if UNITY_IOS return(AdTraceiOS.IsEnabled()); #elif UNITY_ANDROID return(AdTraceAndroid.IsEnabled()); #else Debug.Log(errorMsgPlatform); return(false); #endif }
public static void getGoogleAdId(Action <string> onDeviceIdsRead) { if (IsEditor()) { return; } #if UNITY_IOS Debug.Log("AdTrace: Google Play Advertising ID is not available on iOS platform."); onDeviceIdsRead(string.Empty); #elif UNITY_ANDROID AdTraceAndroid.GetGoogleAdId(onDeviceIdsRead); onDeviceIdsRead(string.Empty); #else Debug.Log(errorMsgPlatform); #endif }
public static string getAmazonAdId() { if (IsEditor()) { return(string.Empty); } #if UNITY_IOS Debug.Log("AdTrace: Amazon Advertising ID is not available on iOS platform."); return(string.Empty); #elif UNITY_ANDROID return(AdTraceAndroid.GetAmazonAdId()); return(string.Empty); #else Debug.Log(errorMsgPlatform); return(string.Empty); #endif }
public static void trackEvent(AdTraceEvent adtraceEvent) { if (IsEditor()) { return; } if (adtraceEvent == null) { Debug.Log("AdTrace: Missing event to track."); return; } #if UNITY_IOS AdTraceiOS.TrackEvent(adtraceEvent); #elif UNITY_ANDROID AdTraceAndroid.TrackEvent(adtraceEvent); #else Debug.Log(errorMsgPlatform); #endif }
void OnApplicationPause(bool pauseStatus) { if (IsEditor()) { return; } #if UNITY_IOS // No action, iOS SDK is subscribed to iOS lifecycle notifications. #elif UNITY_ANDROID if (pauseStatus) { AdTraceAndroid.OnPause(); } else { AdTraceAndroid.OnResume(); } #else Debug.Log(errorMsgPlatform); #endif }