Exemplo n.º 1
0
        private void TransferSessionPackage()
        {
            // build Session Package
            var sessionBuilder = new PackageBuilder(AdjustConfig, DeviceInfo, ActivityState, DateTime.Now);
            var sessionPackage = sessionBuilder.BuildSessionPackage();

            // send Session Package
            PackageHandler.AddPackage(sessionPackage);
            PackageHandler.SendFirstPackage();
        }
Exemplo n.º 2
0
        public ActivityPackage GetDeeplinkClickPackage(Dictionary<string, string> extraParameters, AdjustAttribution attribution)
        {
            var now = DateTime.Now;

            var packageBuilder = new PackageBuilder(AdjustConfig, DeviceInfo, ActivityState, now);
            packageBuilder.ExtraParameters = extraParameters;

            return packageBuilder.BuildClickPackage("deeplink", now, attribution);
        }
Exemplo n.º 3
0
        private void TrackEventInternal(AdjustEvent adjustEvent)
        {
            if (!IsEnabled()) { return; }
            if (!CheckEvent(adjustEvent)) { return; }

            var now = DateTime.Now;

            ActivityState.EventCount++;
            UpdateActivityState(now);

            var packageBuilder = new PackageBuilder(AdjustConfig, DeviceInfo, ActivityState, now);
            ActivityPackage eventPackage = packageBuilder.BuildEventPackage(adjustEvent);
            PackageHandler.AddPackage(eventPackage);

            if (AdjustConfig.EventBufferingEnabled)
            {
                Logger.Info("Buffered event {0}", eventPackage.Suffix);
            }
            else
            {
                PackageHandler.SendFirstPackage();
            }

            WriteActivityStateInternal();
        }
Exemplo n.º 4
0
 public ActivityPackage GetAttributionPackage()
 {
     var now = DateTime.Now;
     var packageBuilder = new PackageBuilder(AdjustConfig, DeviceInfo, now);
     return packageBuilder.BuildAttributionPackage();
 }