Esempio n. 1
0
        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
        }
Esempio n. 2
0
 public static void gdprForgetMe()
 {
     #if UNITY_IOS
     AdTraceiOS.GdprForgetMe();
     #elif UNITY_ANDROID
     AdTraceAndroid.GdprForgetMe();
     #else
     Debug.Log(errorMsgPlatform);
     #endif
 }
Esempio n. 3
0
        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
        }
Esempio n. 4
0
        public static void resetSessionCallbackParameters()
        {
            if (IsEditor())
            {
                return;
            }

            #if UNITY_IOS
            AdTraceiOS.ResetSessionCallbackParameters();
            #elif UNITY_ANDROID
            AdTraceAndroid.ResetSessionCallbackParameters();
            #else
            Debug.Log(errorMsgPlatform);
            #endif
        }
Esempio n. 5
0
        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
        }
Esempio n. 6
0
        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
        }
Esempio n. 7
0
        public static void sendFirstPackages()
        {
            if (IsEditor())
            {
                return;
            }

            #if UNITY_IOS
            AdTraceiOS.SendFirstPackages();
            #elif UNITY_ANDROID
            AdTraceAndroid.SendFirstPackages();
            #else
            Debug.Log(errorMsgPlatform);
            #endif
        }
Esempio n. 8
0
        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
        }
Esempio n. 9
0
        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
        }
Esempio n. 10
0
        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
        }
Esempio n. 11
0
        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
        }
Esempio n. 12
0
        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
        }
Esempio n. 13
0
        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
        }
Esempio n. 14
0
        public static string getIdfa()
        {
            if (IsEditor())
            {
                return(string.Empty);
            }

            #if UNITY_IOS
            return(AdTraceiOS.GetIdfa());
            #elif UNITY_ANDROID
            Debug.Log("AdTrace: Error! IDFA is not available on Android platform.");
            return(string.Empty);
            #else
            Debug.Log(errorMsgPlatform);
            return(string.Empty);
            #endif
        }
Esempio n. 15
0
        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
        }