Esempio n. 1
0
        public void SetConfig(string json)
        {
            Debug.Log($"---- AdjustHelper SetConfig // Json {json}");

            if (!string.IsNullOrEmpty(json) && !json.Equals("{}"))
            {
                _adjustData = JsonUtility.FromJson <AdjustData>(json);

                if (string.IsNullOrEmpty(_adjustData.token))
                {
                    Debug.Log("!!!!!!!!!!!!!!!! Error: Adjust Token is Empty ");
                    return;
                }
                else
                {
                    Debug.Log($"AdjustHelper Init // Token {_adjustData.token}");
                }

                var config = new AdjustConfig(_adjustData.token, AdjustEnvironment.Production, false);
                config.setLogLevel(AdjustLogLevel.Verbose);
                config.setSendInBackground(true);
                config.setAttributionChangedDelegate(AttributionChangedCallback);

                config.setDefaultTracker(_adjustData.token);
                config.setAllowIdfaReading(true);
                config.setPreinstallTrackingEnabled(true);
                config.setAllowiAdInfoReading(true);
                config.setAllowAdServicesInfoReading(true);

                config.setEventBufferingEnabled(true);
                //config.setProcessName();

                Adjust.setEnabled(true);
                Adjust.start(config);

                Debug.Log($"Adjust started");
            }
            else
            {
                Debug.Log($"!!!!!!!!!!!!!!!! AdjustHelper isn`t inited");
            }
        }