Ejemplo n.º 1
0
 public static AdjustAttribution GetAttribution()
 {
     try
     {
         AndroidJavaObject androidJavaObject = ajcAdjust.CallStatic <AndroidJavaObject>("getAttribution", new object[0]);
         if (androidJavaObject == null)
         {
             return(null);
         }
         AdjustAttribution adjustAttribution = new AdjustAttribution();
         adjustAttribution.trackerName  = ((!(androidJavaObject.Get <string>(AdjustUtils.KeyTrackerName) == string.Empty)) ? androidJavaObject.Get <string>(AdjustUtils.KeyTrackerName) : null);
         adjustAttribution.trackerToken = ((!(androidJavaObject.Get <string>(AdjustUtils.KeyTrackerToken) == string.Empty)) ? androidJavaObject.Get <string>(AdjustUtils.KeyTrackerToken) : null);
         adjustAttribution.network      = ((!(androidJavaObject.Get <string>(AdjustUtils.KeyNetwork) == string.Empty)) ? androidJavaObject.Get <string>(AdjustUtils.KeyNetwork) : null);
         adjustAttribution.campaign     = ((!(androidJavaObject.Get <string>(AdjustUtils.KeyCampaign) == string.Empty)) ? androidJavaObject.Get <string>(AdjustUtils.KeyCampaign) : null);
         adjustAttribution.adgroup      = ((!(androidJavaObject.Get <string>(AdjustUtils.KeyAdgroup) == string.Empty)) ? androidJavaObject.Get <string>(AdjustUtils.KeyAdgroup) : null);
         adjustAttribution.creative     = ((!(androidJavaObject.Get <string>(AdjustUtils.KeyCreative) == string.Empty)) ? androidJavaObject.Get <string>(AdjustUtils.KeyCreative) : null);
         adjustAttribution.clickLabel   = ((!(androidJavaObject.Get <string>(AdjustUtils.KeyClickLabel) == string.Empty)) ? androidJavaObject.Get <string>(AdjustUtils.KeyClickLabel) : null);
         adjustAttribution.adid         = ((!(androidJavaObject.Get <string>(AdjustUtils.KeyAdid) == string.Empty)) ? androidJavaObject.Get <string>(AdjustUtils.KeyAdid) : null);
         return(adjustAttribution);
     }
     catch (Exception)
     {
     }
     return(null);
 }
Ejemplo n.º 2
0
 // Token: 0x06000089 RID: 137 RVA: 0x00004324 File Offset: 0x00002724
 private void AttributionChangedCallback(AdjustAttribution attributionData)
 {
     Debug.Log("Attribution changed!");
     if (attributionData.trackerName != null)
     {
         Debug.Log("trackerName " + attributionData.trackerName);
     }
     if (attributionData.trackerToken != null)
     {
         Debug.Log("trackerToken " + attributionData.trackerToken);
     }
     if (attributionData.network != null)
     {
         Debug.Log("network " + attributionData.network);
     }
     if (attributionData.campaign != null)
     {
         Debug.Log("campaign " + attributionData.campaign);
     }
     if (attributionData.adgroup != null)
     {
         Debug.Log("adgroup " + attributionData.adgroup);
     }
     if (attributionData.creative != null)
     {
         Debug.Log("creative " + attributionData.creative);
     }
     if (attributionData.clickLabel != null)
     {
         Debug.Log("clickLabel" + attributionData.clickLabel);
     }
 }
Ejemplo n.º 3
0
        public static AdjustAttribution GetAttribution()
        {
            try
            {
                AndroidJavaObject ajoAttribution = ajcAdjust.CallStatic <AndroidJavaObject>("getAttribution");
                if (null == ajoAttribution)
                {
                    return(null);
                }

                AdjustAttribution adjustAttribution = new AdjustAttribution();
                adjustAttribution.trackerName = ajoAttribution.Get <string>(AdjustUtils.KeyTrackerName) == "" ?
                                                null : ajoAttribution.Get <string>(AdjustUtils.KeyTrackerName);
                adjustAttribution.trackerToken = ajoAttribution.Get <string>(AdjustUtils.KeyTrackerToken) == "" ?
                                                 null : ajoAttribution.Get <string>(AdjustUtils.KeyTrackerToken);
                adjustAttribution.network = ajoAttribution.Get <string>(AdjustUtils.KeyNetwork) == "" ?
                                            null : ajoAttribution.Get <string>(AdjustUtils.KeyNetwork);
                adjustAttribution.campaign = ajoAttribution.Get <string>(AdjustUtils.KeyCampaign) == "" ?
                                             null : ajoAttribution.Get <string>(AdjustUtils.KeyCampaign);
                adjustAttribution.adgroup = ajoAttribution.Get <string>(AdjustUtils.KeyAdgroup) == "" ?
                                            null : ajoAttribution.Get <string>(AdjustUtils.KeyAdgroup);
                adjustAttribution.creative = ajoAttribution.Get <string>(AdjustUtils.KeyCreative) == "" ?
                                             null : ajoAttribution.Get <string>(AdjustUtils.KeyCreative);
                adjustAttribution.clickLabel = ajoAttribution.Get <string>(AdjustUtils.KeyClickLabel) == "" ?
                                               null : ajoAttribution.Get <string>(AdjustUtils.KeyClickLabel);
                adjustAttribution.adid = ajoAttribution.Get <string>(AdjustUtils.KeyAdid) == "" ?
                                         null : ajoAttribution.Get <string>(AdjustUtils.KeyAdid);
                return(adjustAttribution);
            }
            catch (Exception) {}

            return(null);
        }
Ejemplo n.º 4
0
            // Method must be lowercase to match Android method signature.
            public void onAttributionChanged(AndroidJavaObject attribution)
            {
                if (callback == null)
                {
                    return;
                }

                AdjustAttribution adjustAttribution = new AdjustAttribution();

                adjustAttribution.trackerName = attribution.Get <string>(AdjustUtils.KeyTrackerName) == "" ?
                                                null : attribution.Get <string>(AdjustUtils.KeyTrackerName);
                adjustAttribution.trackerToken = attribution.Get <string>(AdjustUtils.KeyTrackerToken) == "" ?
                                                 null : attribution.Get <string>(AdjustUtils.KeyTrackerToken);
                adjustAttribution.network = attribution.Get <string>(AdjustUtils.KeyNetwork) == "" ?
                                            null : attribution.Get <string>(AdjustUtils.KeyNetwork);
                adjustAttribution.campaign = attribution.Get <string>(AdjustUtils.KeyCampaign) == "" ?
                                             null : attribution.Get <string>(AdjustUtils.KeyCampaign);
                adjustAttribution.adgroup = attribution.Get <string>(AdjustUtils.KeyAdgroup) == "" ?
                                            null : attribution.Get <string>(AdjustUtils.KeyAdgroup);
                adjustAttribution.creative = attribution.Get <string>(AdjustUtils.KeyCreative) == "" ?
                                             null : attribution.Get <string>(AdjustUtils.KeyCreative);
                adjustAttribution.clickLabel = attribution.Get <string>(AdjustUtils.KeyClickLabel) == "" ?
                                               null : attribution.Get <string>(AdjustUtils.KeyClickLabel);
                adjustAttribution.adid = attribution.Get <string>(AdjustUtils.KeyAdid) == "" ?
                                         null : attribution.Get <string>(AdjustUtils.KeyAdid);
                callback(adjustAttribution);
            }
Ejemplo n.º 5
0
        // Our delegate for detecting attribution changes if choosen not to start manually.
        private void responseDelegate(AdjustAttribution responseData)
        {
            Debug.Log("Attribution changed!");

            if (responseData.trackerName != null)
            {
                Debug.Log("trackerName " + responseData.trackerName);
            }

            if (responseData.trackerToken != null)
            {
                Debug.Log("trackerToken " + responseData.trackerToken);
            }

            if (responseData.network != null)
            {
                Debug.Log("network " + responseData.network);
            }

            if (responseData.campaign != null)
            {
                Debug.Log("campaign " + responseData.campaign);
            }

            if (responseData.adgroup != null)
            {
                Debug.Log("adgroup " + responseData.adgroup);
            }

            if (responseData.creative != null)
            {
                Debug.Log("creative " + responseData.creative);
            }
        }
Ejemplo n.º 6
0
        public static AdjustAttribution GetAttribution()
        {
            string attributionString = _AdjustGetAttribution();

            if (null == attributionString)
            {
                return(null);
            }

            var attribution = new AdjustAttribution(attributionString);

            return(attribution);
        }
Ejemplo n.º 7
0
        public void GetNativeAttribution(string attributionData)
        {
            if (!Application.isEditor)
            {
                if (Adjust.attributionChangedDelegate == null)
                {
                    Debug.Log("Adjust: Attribution changed delegate was not set.");
                    return;
                }

                var attribution = new AdjustAttribution(attributionData);
                Adjust.attributionChangedDelegate(attribution);
            }
        }
Ejemplo n.º 8
0
        public static void runAttributionChangedDictionary(Dictionary<string, string> dicAttributionData)
        {
            if (instance == null) {
                Debug.Log (Adjust.errorMessage);
                return;
            }
            if (Adjust.attributionChangedDelegate == null) {
                Debug.Log ("adjust: Attribution changed delegate was not set.");
                return;
            }

            var attribution = new AdjustAttribution (dicAttributionData);
            Adjust.attributionChangedDelegate (attribution);
        }
 // Token: 0x060000C0 RID: 192 RVA: 0x00005DD8 File Offset: 0x000041D8
 public AdjustAttribution(Dictionary <string, string> dicAttributionData)
 {
     if (dicAttributionData == null)
     {
         return;
     }
     this.trackerName  = AdjustAttribution.TryGetValue(dicAttributionData, AdjustUtils.KeyTrackerName);
     this.trackerToken = AdjustAttribution.TryGetValue(dicAttributionData, AdjustUtils.KeyTrackerToken);
     this.network      = AdjustAttribution.TryGetValue(dicAttributionData, AdjustUtils.KeyNetwork);
     this.campaign     = AdjustAttribution.TryGetValue(dicAttributionData, AdjustUtils.KeyCampaign);
     this.adgroup      = AdjustAttribution.TryGetValue(dicAttributionData, AdjustUtils.KeyAdgroup);
     this.creative     = AdjustAttribution.TryGetValue(dicAttributionData, AdjustUtils.KeyCreative);
     this.clickLabel   = AdjustAttribution.TryGetValue(dicAttributionData, AdjustUtils.KeyClickLabel);
 }
Ejemplo n.º 10
0
        public static AdjustAttribution GetAttribution()
        {
            try
            {
                AndroidJavaObject ajoAttribution = ajcAdjust.CallStatic <AndroidJavaObject>("getAttribution");
                if (null == ajoAttribution)
                {
                    return(null);
                }

                AdjustAttribution adjustAttribution = new AdjustAttribution();
                adjustAttribution.trackerName = ajoAttribution.Get <string>(AdjustUtils.KeyTrackerName) == "" ?
                                                null : ajoAttribution.Get <string>(AdjustUtils.KeyTrackerName);
                adjustAttribution.trackerToken = ajoAttribution.Get <string>(AdjustUtils.KeyTrackerToken) == "" ?
                                                 null : ajoAttribution.Get <string>(AdjustUtils.KeyTrackerToken);
                adjustAttribution.network = ajoAttribution.Get <string>(AdjustUtils.KeyNetwork) == "" ?
                                            null : ajoAttribution.Get <string>(AdjustUtils.KeyNetwork);
                adjustAttribution.campaign = ajoAttribution.Get <string>(AdjustUtils.KeyCampaign) == "" ?
                                             null : ajoAttribution.Get <string>(AdjustUtils.KeyCampaign);
                adjustAttribution.adgroup = ajoAttribution.Get <string>(AdjustUtils.KeyAdgroup) == "" ?
                                            null : ajoAttribution.Get <string>(AdjustUtils.KeyAdgroup);
                adjustAttribution.creative = ajoAttribution.Get <string>(AdjustUtils.KeyCreative) == "" ?
                                             null : ajoAttribution.Get <string>(AdjustUtils.KeyCreative);
                adjustAttribution.clickLabel = ajoAttribution.Get <string>(AdjustUtils.KeyClickLabel) == "" ?
                                               null : ajoAttribution.Get <string>(AdjustUtils.KeyClickLabel);
                adjustAttribution.adid = ajoAttribution.Get <string>(AdjustUtils.KeyAdid) == "" ?
                                         null : ajoAttribution.Get <string>(AdjustUtils.KeyAdid);
                adjustAttribution.costType = ajoAttribution.Get <string>(AdjustUtils.KeyCostType) == "" ?
                                             null : ajoAttribution.Get <string>(AdjustUtils.KeyCostType);
                AndroidJavaObject ajoCostAmount = ajoAttribution.Get <AndroidJavaObject>(AdjustUtils.KeyCostAmount) == null ?
                                                  null : ajoAttribution.Get <AndroidJavaObject>(AdjustUtils.KeyCostAmount);
                if (ajoCostAmount == null)
                {
                    adjustAttribution.costAmount = null;
                }
                else
                {
                    double costAmount = ajoCostAmount.Call <double>("doubleValue");
                    adjustAttribution.costAmount = costAmount;
                }
                adjustAttribution.costCurrency = ajoAttribution.Get <string>(AdjustUtils.KeyCostCurrency) == "" ?
                                                 null : ajoAttribution.Get <string>(AdjustUtils.KeyCostCurrency);
                return(adjustAttribution);
            }
            catch (Exception) {}

            return(null);
        }
Ejemplo n.º 11
0
        public static void runAttributionChangedDictionary(Dictionary <string, string> dicAttributionData)
        {
            if (instance == null)
            {
                Debug.Log(Adjust.errorMessage);
                return;
            }
            if (Adjust.attributionChangedDelegate == null)
            {
                Debug.Log("adjust: Attribution changed delegate was not set.");
                return;
            }
            var attribution = new AdjustAttribution(dicAttributionData);

            Adjust.attributionChangedDelegate(attribution);
        }
Ejemplo n.º 12
0
            public void onAttributionChanged(AndroidJavaObject attribution)
            {
                AdjustAttribution adjustAttribution = new AdjustAttribution();

                adjustAttribution.trackerName  = attribution.Get <string> ("trackerName");
                adjustAttribution.trackerToken = attribution.Get <string> ("trackerToken");
                adjustAttribution.network      = attribution.Get <string> ("network");
                adjustAttribution.campaign     = attribution.Get <string> ("campaign");
                adjustAttribution.adgroup      = attribution.Get <string> ("adgroup");
                adjustAttribution.creative     = attribution.Get <string> ("creative");

                if (callback != null)
                {
                    callback(adjustAttribution);
                }
            }
Ejemplo n.º 13
0
        // Token: 0x06000083 RID: 131 RVA: 0x00004174 File Offset: 0x00002574
        public void GetNativeAttribution(string attributionData)
        {
            if (Adjust.instance == null)
            {
                Debug.Log("adjust: SDK not started. Start it manually using the 'start' method.");
                return;
            }
            if (Adjust.attributionChangedDelegate == null)
            {
                Debug.Log("adjust: Attribution changed delegate was not set.");
                return;
            }
            AdjustAttribution obj = new AdjustAttribution(attributionData);

            Adjust.attributionChangedDelegate(obj);
        }
Ejemplo n.º 14
0
 public void onAttributionChanged(AndroidJavaObject attribution)
 {
     if (callback != null)
     {
         AdjustAttribution adjustAttribution = new AdjustAttribution();
         adjustAttribution.trackerName  = ((!(attribution.Get <string>(AdjustUtils.KeyTrackerName) == string.Empty)) ? attribution.Get <string>(AdjustUtils.KeyTrackerName) : null);
         adjustAttribution.trackerToken = ((!(attribution.Get <string>(AdjustUtils.KeyTrackerToken) == string.Empty)) ? attribution.Get <string>(AdjustUtils.KeyTrackerToken) : null);
         adjustAttribution.network      = ((!(attribution.Get <string>(AdjustUtils.KeyNetwork) == string.Empty)) ? attribution.Get <string>(AdjustUtils.KeyNetwork) : null);
         adjustAttribution.campaign     = ((!(attribution.Get <string>(AdjustUtils.KeyCampaign) == string.Empty)) ? attribution.Get <string>(AdjustUtils.KeyCampaign) : null);
         adjustAttribution.adgroup      = ((!(attribution.Get <string>(AdjustUtils.KeyAdgroup) == string.Empty)) ? attribution.Get <string>(AdjustUtils.KeyAdgroup) : null);
         adjustAttribution.creative     = ((!(attribution.Get <string>(AdjustUtils.KeyCreative) == string.Empty)) ? attribution.Get <string>(AdjustUtils.KeyCreative) : null);
         adjustAttribution.clickLabel   = ((!(attribution.Get <string>(AdjustUtils.KeyClickLabel) == string.Empty)) ? attribution.Get <string>(AdjustUtils.KeyClickLabel) : null);
         adjustAttribution.adid         = ((!(attribution.Get <string>(AdjustUtils.KeyAdid) == string.Empty)) ? attribution.Get <string>(AdjustUtils.KeyAdid) : null);
         callback(adjustAttribution);
     }
 }
Ejemplo n.º 15
0
// GameGrowth update: Setting iOS "Native" methods as static to be able to access without instance
#if UNITY_IOS
        public static void GetNativeAttribution(string attributionData)
        {
            if (IsEditor())
            {
                return;
            }

            if (Adjust.attributionChangedDelegate == null)
            {
                Debug.Log("[Adjust]: Attribution changed delegate was not set.");
                return;
            }

            var attribution = new AdjustAttribution(attributionData);

            Adjust.attributionChangedDelegate(attribution);
        }
Ejemplo n.º 16
0
    public void attributionChangedDelegate(AdjustAttribution attribution)
    {
        Debug.Log ("Attribution changed");

        if (attribution.trackerName != null)
            Debug.Log ("trackerName " + attribution.trackerName);
        if (attribution.trackerToken != null)
            Debug.Log ("trackerToken " + attribution.trackerToken);
        if (attribution.network != null)
            Debug.Log ("network " + attribution.network);
        if (attribution.campaign != null)
            Debug.Log ("campaign " + attribution.campaign);
        if (attribution.adgroup != null)
            Debug.Log ("adgroup " + attribution.adgroup);
        if (attribution.creative != null)
            Debug.Log ("creative " + attribution.creative);
    }
Ejemplo n.º 17
0
        public void GetNativeAttribution(string attributionData)
        {
            if (instance == null)
            {
                Debug.Log(Adjust.errorMessage);
                return;
            }

            if (Adjust.attributionChangedDelegate == null)
            {
                Debug.Log("adjust: Attribution changed delegate was not set.");
                return;
            }

            var attribution = new AdjustAttribution(attributionData);

            Adjust.attributionChangedDelegate(attribution);
        }
Ejemplo n.º 18
0
        // Our delegate for detecting attribution changes if chosen not to start manually.
        private void AttributionChangedCallback(AdjustAttribution attributionData)
        {
            Debug.Log("Attribution changed!");

            if (attributionData.trackerName != null)
            {
                Debug.Log("Tracker name: " + attributionData.trackerName);
            }

            if (attributionData.trackerToken != null)
            {
                Debug.Log("Tracker token: " + attributionData.trackerToken);
            }

            if (attributionData.network != null)
            {
                Debug.Log("Network: " + attributionData.network);
            }

            if (attributionData.campaign != null)
            {
                Debug.Log("Campaign: " + attributionData.campaign);
            }

            if (attributionData.adgroup != null)
            {
                Debug.Log("Adgroup: " + attributionData.adgroup);
            }

            if (attributionData.creative != null)
            {
                Debug.Log("Creative: " + attributionData.creative);
            }

            if (attributionData.clickLabel != null)
            {
                Debug.Log("Click label: " + attributionData.clickLabel);
            }

            if (attributionData.adid != null)
            {
                Debug.Log("ADID: " + attributionData.adid);
            }
        }
Ejemplo n.º 19
0
            // Method must be lowercase to match Android method signature.
            public void onAttributionChanged(AndroidJavaObject attribution)
            {
                if (callback == null)
                {
                    return;
                }

                AdjustAttribution adjustAttribution = new AdjustAttribution();

                adjustAttribution.trackerName = attribution.Get <string>(AdjustUtils.KeyTrackerName) == "" ?
                                                null : attribution.Get <string>(AdjustUtils.KeyTrackerName);
                adjustAttribution.trackerToken = attribution.Get <string>(AdjustUtils.KeyTrackerToken) == "" ?
                                                 null : attribution.Get <string>(AdjustUtils.KeyTrackerToken);
                adjustAttribution.network = attribution.Get <string>(AdjustUtils.KeyNetwork) == "" ?
                                            null : attribution.Get <string>(AdjustUtils.KeyNetwork);
                adjustAttribution.campaign = attribution.Get <string>(AdjustUtils.KeyCampaign) == "" ?
                                             null : attribution.Get <string>(AdjustUtils.KeyCampaign);
                adjustAttribution.adgroup = attribution.Get <string>(AdjustUtils.KeyAdgroup) == "" ?
                                            null : attribution.Get <string>(AdjustUtils.KeyAdgroup);
                adjustAttribution.creative = attribution.Get <string>(AdjustUtils.KeyCreative) == "" ?
                                             null : attribution.Get <string>(AdjustUtils.KeyCreative);
                adjustAttribution.clickLabel = attribution.Get <string>(AdjustUtils.KeyClickLabel) == "" ?
                                               null : attribution.Get <string>(AdjustUtils.KeyClickLabel);
                adjustAttribution.adid = attribution.Get <string>(AdjustUtils.KeyAdid) == "" ?
                                         null : attribution.Get <string>(AdjustUtils.KeyAdid);
                adjustAttribution.costType = attribution.Get <string>(AdjustUtils.KeyCostType) == "" ?
                                             null : attribution.Get <string>(AdjustUtils.KeyCostType);
                AndroidJavaObject ajoCostAmount = attribution.Get <AndroidJavaObject>(AdjustUtils.KeyCostAmount) == null ?
                                                  null : attribution.Get <AndroidJavaObject>(AdjustUtils.KeyCostAmount);

                if (ajoCostAmount == null)
                {
                    adjustAttribution.costAmount = null;
                }
                else
                {
                    double costAmount = ajoCostAmount.Call <double>("doubleValue");
                    adjustAttribution.costAmount = costAmount;
                }
                adjustAttribution.costCurrency = attribution.Get <string>(AdjustUtils.KeyCostCurrency) == "" ?
                                                 null : attribution.Get <string>(AdjustUtils.KeyCostCurrency);
                callback(adjustAttribution);
            }
Ejemplo n.º 20
0
        public static void Start(AdjustConfig adjustConfig)
        {
            string logLevelString = null;
            string environment    = adjustConfig.environment.ToLowercaseString();

            Action <Dictionary <string, string> > attributionChangedAction    = null;
            Action <Dictionary <string, string> > sessionSuccessChangedAction = null;
            Action <Dictionary <string, string> > sessionFailureChangedAction = null;
            Action <Dictionary <string, string> > eventSuccessChangedAction   = null;
            Action <Dictionary <string, string> > eventFailureChangedAction   = null;
            Func <string, bool> deeplinkResponseFunc = null;

            if (adjustConfig.logLevel.HasValue)
            {
                logLevelString = adjustConfig.logLevel.Value.ToLowercaseString();
            }

            if (adjustConfig.attributionChangedDelegate != null)
            {
                attributionChangedAction = (attributionMap) =>
                {
                    var attribution = new AdjustAttribution(attributionMap);
                    adjustConfig.attributionChangedDelegate(attribution);
                };
            }

            if (adjustConfig.sessionSuccessDelegate != null)
            {
                sessionSuccessChangedAction = (sessionMap) =>
                {
                    var sessionData = new AdjustSessionSuccess(sessionMap);
                    adjustConfig.sessionSuccessDelegate(sessionData);
                };
            }

            if (adjustConfig.sessionFailureDelegate != null)
            {
                sessionFailureChangedAction = (sessionMap) =>
                {
                    var sessionData = new AdjustSessionFailure(sessionMap);
                    adjustConfig.sessionFailureDelegate(sessionData);
                };
            }

            if (adjustConfig.eventSuccessDelegate != null)
            {
                eventSuccessChangedAction = (eventMap) =>
                {
                    var eventData = new AdjustEventSuccess(eventMap);
                    adjustConfig.eventSuccessDelegate(eventData);
                };
            }

            if (adjustConfig.eventFailureDelegate != null)
            {
                eventFailureChangedAction = (eventMap) =>
                {
                    var eventData = new AdjustEventFailure(eventMap);
                    adjustConfig.eventFailureDelegate(eventData);
                };
            }

            if (adjustConfig.deferredDeeplinkDelegate != null)
            {
                deeplinkResponseFunc = uri =>
                {
                    if (adjustConfig.launchDeferredDeeplink)
                    {
                        adjustConfig.deferredDeeplinkDelegate(uri);
                    }

                    return(adjustConfig.launchDeferredDeeplink);
                };
            }

            bool sendInBackground = false;

            if (adjustConfig.sendInBackground.HasValue)
            {
                sendInBackground = adjustConfig.sendInBackground.Value;
            }

            double delayStartSeconds = 0;

            if (adjustConfig.delayStart.HasValue)
            {
                delayStartSeconds = adjustConfig.delayStart.Value;
            }

            AdjustConfigDto adjustConfigDto = new AdjustConfigDto {
                AppToken                     = adjustConfig.appToken,
                Environment                  = environment,
                SdkPrefix                    = sdkPrefix,
                SendInBackground             = sendInBackground,
                DelayStart                   = delayStartSeconds,
                UserAgent                    = adjustConfig.userAgent,
                DefaultTracker               = adjustConfig.defaultTracker,
                EventBufferingEnabled        = adjustConfig.eventBufferingEnabled,
                LaunchDeferredDeeplink       = adjustConfig.launchDeferredDeeplink,
                LogLevelString               = logLevelString,
                LogDelegate                  = adjustConfig.logDelegate,
                ActionAttributionChangedData = attributionChangedAction,
                ActionSessionSuccessData     = sessionSuccessChangedAction,
                ActionSessionFailureData     = sessionFailureChangedAction,
                ActionEventSuccessData       = eventSuccessChangedAction,
                ActionEventFailureData       = eventFailureChangedAction,
                FuncDeeplinkResponseData     = deeplinkResponseFunc,
                IsDeviceKnown                = adjustConfig.isDeviceKnown,
                SecretId                     = adjustConfig.secretId,
                Info1 = adjustConfig.info1,
                Info2 = adjustConfig.info2,
                Info3 = adjustConfig.info3,
                Info4 = adjustConfig.info4
            };

            AdjustWinInterface.ApplicationLaunching(adjustConfigDto);
            AdjustWinInterface.ApplicationActivated();
            appLaunched = true;
        }
Ejemplo n.º 21
0
        // Our delegate for detecting attribution changes if choosen not to start manually.
        private void responseDelegate(AdjustAttribution responseData)
        {
            Debug.Log ("Attribution changed!");

            if (responseData.trackerName != null) {
                Debug.Log ("trackerName " + responseData.trackerName);
            }

            if (responseData.trackerToken != null) {
                Debug.Log ("trackerToken " + responseData.trackerToken);
            }

            if (responseData.network != null) {
                Debug.Log ("network " + responseData.network);
            }

            if (responseData.campaign != null) {
                Debug.Log ("campaign " + responseData.campaign);
            }

            if (responseData.adgroup != null) {
                Debug.Log ("adgroup " + responseData.adgroup);
            }

            if (responseData.creative != null) {
                Debug.Log ("creative " + responseData.creative);
            }

            if (responseData.clickLabel != null) {
                Debug.Log ("clickLabel" + responseData.clickLabel);
            }
        }
Ejemplo n.º 22
0
            public void onAttributionChanged(AndroidJavaObject attribution)
            {
                AdjustAttribution adjustAttribution = new AdjustAttribution ();

                adjustAttribution.trackerName = attribution.Get<string> ("trackerName");
                adjustAttribution.trackerToken = attribution.Get<string> ("trackerToken");
                adjustAttribution.network = attribution.Get<string> ("network");
                adjustAttribution.campaign = attribution.Get<string> ("campaign");
                adjustAttribution.adgroup = attribution.Get<string> ("adgroup");
                adjustAttribution.creative = attribution.Get<string> ("creative");

                if (callback != null) {
                    callback (adjustAttribution);
                }
            }