Пример #1
0
        public static void start(AdjustConfig adjustConfig)
        {
            if (IsEditor())
            {
                return;
            }

            if (adjustConfig == null)
            {
                Debug.Log("Adjust: Missing config to start.");
                return;
            }

            #if UNITY_IOS
            Adjust.eventSuccessDelegate       = adjustConfig.getEventSuccessDelegate();
            Adjust.eventFailureDelegate       = adjustConfig.getEventFailureDelegate();
            Adjust.sessionSuccessDelegate     = adjustConfig.getSessionSuccessDelegate();
            Adjust.sessionFailureDelegate     = adjustConfig.getSessionFailureDelegate();
            Adjust.deferredDeeplinkDelegate   = adjustConfig.getDeferredDeeplinkDelegate();
            Adjust.attributionChangedDelegate = adjustConfig.getAttributionChangedDelegate();
            AdjustiOS.Start(adjustConfig);
            #elif UNITY_ANDROID
            AdjustAndroid.Start(adjustConfig);
            #elif (UNITY_WSA || UNITY_WP8)
            AdjustWindows.Start(adjustConfig);
            #else
            Debug.Log(errorMsgPlatform);
            #endif
        }
Пример #2
0
 // Token: 0x06000073 RID: 115 RVA: 0x00003F60 File Offset: 0x00002360
 public static void start(AdjustConfig adjustConfig)
 {
     if (Adjust.instance != null)
     {
         Debug.Log("adjust: Error, SDK already started.");
         return;
     }
     if (adjustConfig == null)
     {
         Debug.Log("adjust: Missing config to start.");
         return;
     }
     Adjust.instance = new AdjustAndroid();
     if (Adjust.instance == null)
     {
         Debug.Log("adjust: SDK can only be used in Android, iOS, Windows Phone 8 or Windows Store apps.");
         return;
     }
     Adjust.eventSuccessDelegate       = adjustConfig.getEventSuccessDelegate();
     Adjust.eventFailureDelegate       = adjustConfig.getEventFailureDelegate();
     Adjust.sessionSuccessDelegate     = adjustConfig.getSessionSuccessDelegate();
     Adjust.sessionFailureDelegate     = adjustConfig.getSessionFailureDelegate();
     Adjust.deferredDeeplinkDelegate   = adjustConfig.getDeferredDeeplinkDelegate();
     Adjust.attributionChangedDelegate = adjustConfig.getAttributionChangedDelegate();
     Adjust.instance.start(adjustConfig);
 }
Пример #3
0
        public static void Start(AdjustConfig adjustConfig)
        {
            string appToken                              = adjustConfig.appToken != null ? adjustConfig.appToken : "ADJ_INVALID";
            string sceneName                             = adjustConfig.sceneName != null ? adjustConfig.sceneName : "ADJ_INVALID";
            string userAgent                             = adjustConfig.userAgent != null ? adjustConfig.userAgent : "ADJ_INVALID";
            string defaultTracker                        = adjustConfig.defaultTracker != null ? adjustConfig.defaultTracker : "ADJ_INVALID";
            string externalDeviceId                      = adjustConfig.externalDeviceId != null ? adjustConfig.externalDeviceId : "ADJ_INVALID";
            string environment                           = adjustConfig.environment.ToLowercaseString();
            long   info1                                 = AdjustUtils.ConvertLong(adjustConfig.info1);
            long   info2                                 = AdjustUtils.ConvertLong(adjustConfig.info2);
            long   info3                                 = AdjustUtils.ConvertLong(adjustConfig.info3);
            long   info4                                 = AdjustUtils.ConvertLong(adjustConfig.info4);
            long   secretId                              = AdjustUtils.ConvertLong(adjustConfig.secretId);
            double delayStart                            = AdjustUtils.ConvertDouble(adjustConfig.delayStart);
            int    logLevel                              = AdjustUtils.ConvertLogLevel(adjustConfig.logLevel);
            int    isDeviceKnown                         = AdjustUtils.ConvertBool(adjustConfig.isDeviceKnown);
            int    sendInBackground                      = AdjustUtils.ConvertBool(adjustConfig.sendInBackground);
            int    eventBufferingEnabled                 = AdjustUtils.ConvertBool(adjustConfig.eventBufferingEnabled);
            int    allowiAdInfoReading                   = AdjustUtils.ConvertBool(adjustConfig.allowiAdInfoReading);
            int    allowIdfaReading                      = AdjustUtils.ConvertBool(adjustConfig.allowIdfaReading);
            int    allowSuppressLogLevel                 = AdjustUtils.ConvertBool(adjustConfig.allowSuppressLogLevel);
            int    launchDeferredDeeplink                = AdjustUtils.ConvertBool(adjustConfig.launchDeferredDeeplink);
            int    isAttributionCallbackImplemented      = AdjustUtils.ConvertBool(adjustConfig.getAttributionChangedDelegate() != null);
            int    isEventSuccessCallbackImplemented     = AdjustUtils.ConvertBool(adjustConfig.getEventSuccessDelegate() != null);
            int    isEventFailureCallbackImplemented     = AdjustUtils.ConvertBool(adjustConfig.getEventFailureDelegate() != null);
            int    isSessionSuccessCallbackImplemented   = AdjustUtils.ConvertBool(adjustConfig.getSessionSuccessDelegate() != null);
            int    isSessionFailureCallbackImplemented   = AdjustUtils.ConvertBool(adjustConfig.getSessionFailureDelegate() != null);
            int    isDeferredDeeplinkCallbackImplemented = AdjustUtils.ConvertBool(adjustConfig.getDeferredDeeplinkDelegate() != null);

            _AdjustLaunchApp(
                appToken,
                environment,
                sdkPrefix,
                userAgent,
                defaultTracker,
                externalDeviceId,
                sceneName,
                allowSuppressLogLevel,
                logLevel,
                isDeviceKnown,
                eventBufferingEnabled,
                sendInBackground,
                allowiAdInfoReading,
                allowIdfaReading,
                secretId,
                info1,
                info2,
                info3,
                info4,
                delayStart,
                launchDeferredDeeplink,
                isAttributionCallbackImplemented,
                isEventSuccessCallbackImplemented,
                isEventFailureCallbackImplemented,
                isSessionSuccessCallbackImplemented,
                isSessionFailureCallbackImplemented,
                isDeferredDeeplinkCallbackImplemented);
        }
Пример #4
0
        public static void start(AdjustConfig adjustConfig)
        {
            if (Adjust.instance != null)
            {
                Debug.Log("adjust: Error, SDK already started.");
                return;
            }

            if (adjustConfig == null)
            {
                Debug.Log("adjust: Missing config to start.");
                return;
            }

            #if UNITY_EDITOR
            Adjust.instance = null;
            #elif UNITY_IOS
            Adjust.instance = new AdjustiOS();
            #elif UNITY_ANDROID
            Adjust.instance = new AdjustAndroid();
            #elif UNITY_WP8
            Adjust.instance = new AdjustWP8();
            #elif UNITY_METRO
            Adjust.instance = new AdjustMetro();
            #else
            Adjust.instance = null;
            #endif

            if (Adjust.instance == null)
            {
                Debug.Log("adjust: SDK can only be used in Android, iOS, Windows Phone 8 or Windows Store apps.");
                return;
            }

            Adjust.eventSuccessDelegate       = adjustConfig.getEventSuccessDelegate();
            Adjust.eventFailureDelegate       = adjustConfig.getEventFailureDelegate();
            Adjust.sessionSuccessDelegate     = adjustConfig.getSessionSuccessDelegate();
            Adjust.sessionFailureDelegate     = adjustConfig.getSessionFailureDelegate();
            Adjust.deferredDeeplinkDelegate   = adjustConfig.getDeferredDeeplinkDelegate();
            Adjust.attributionChangedDelegate = adjustConfig.getAttributionChangedDelegate();

            Adjust.instance.start(adjustConfig);
        }
Пример #5
0
        public void start(AdjustConfig adjustConfig)
        {
            string appToken    = adjustConfig.appToken;
            string sceneName   = adjustConfig.sceneName;
            string userAgent   = adjustConfig.userAgent != null ? adjustConfig.userAgent : String.Empty;
            string environment = adjustConfig.environment.lowercaseToString();

            double delayStart = AdjustUtils.ConvertDouble(adjustConfig.delayStart);

            int logLevel               = AdjustUtils.ConvertLogLevel(adjustConfig.logLevel);
            int sendInBackground       = AdjustUtils.ConvertBool(adjustConfig.sendInBackground);
            int eventBufferingEnabled  = AdjustUtils.ConvertBool(adjustConfig.eventBufferingEnabled);
            int allowSuppressLogLevel  = AdjustUtils.ConvertBool(adjustConfig.allowSuppressLogLevel);
            int launchDeferredDeeplink = AdjustUtils.ConvertBool(adjustConfig.launchDeferredDeeplink);

            int isAttributionCallbackImplemented      = AdjustUtils.ConvertBool(adjustConfig.getAttributionChangedDelegate() != null);
            int isEventSuccessCallbackImplemented     = AdjustUtils.ConvertBool(adjustConfig.getEventSuccessDelegate() != null);
            int isEventFailureCallbackImplemented     = AdjustUtils.ConvertBool(adjustConfig.getEventFailureDelegate() != null);
            int isSessionSuccessCallbackImplemented   = AdjustUtils.ConvertBool(adjustConfig.getSessionSuccessDelegate() != null);
            int isSessionFailureCallbackImplemented   = AdjustUtils.ConvertBool(adjustConfig.getSessionFailureDelegate() != null);
            int isDeferredDeeplinkCallbackImplemented = AdjustUtils.ConvertBool(adjustConfig.getDeferredDeeplinkDelegate() != null);

            _AdjustLaunchApp(
                appToken,
                environment,
                sdkPrefix,
                allowSuppressLogLevel,
                logLevel,
                eventBufferingEnabled,
                sendInBackground,
                delayStart,
                userAgent,
                launchDeferredDeeplink,
                sceneName,
                isAttributionCallbackImplemented,
                isEventSuccessCallbackImplemented,
                isEventFailureCallbackImplemented,
                isSessionSuccessCallbackImplemented,
                isSessionFailureCallbackImplemented,
                isDeferredDeeplinkCallbackImplemented);
        }