Ejemplo n.º 1
0
        private void Start()
        {
            Config();

            var configNumber = 0;

            if (Command.ContainsParameter("configName"))
            {
                var configName = Command.GetFirstParameterValue("configName");
                configNumber = int.Parse(configName.Substring(configName.Length - 1));
            }

            var adjustConfig = _savedConfigs[configNumber];

            Adjust.OnCreate(adjustConfig);
            _savedConfigs.Remove(0);
        }
Ejemplo n.º 2
0
        public override void OnCreate()
        {
            base.OnCreate();

            // Configure Adjust.
            const String appToken    = "2fm9gkqubvpc";
            const String environment = AdjustConfig.EnvironmentSandbox;
            AdjustConfig config      = new AdjustConfig(this, appToken, environment);

            // Change the log level.
            config.SetLogLevel(LogLevel.Verbose);

            // Enable event buffering.
            // config.SetEventBufferingEnabled((Java.Lang.Boolean)true);

            // Enable background tracking.
            config.SetSendInBackground(true);

            // Set default tracker.
            // config.SetDefaultTracker("{YourDefaultTracker}");

            // Set attribution callback.
            config.SetOnAttributionChangedListener(this);

            // Set session callbacks.
            config.SetOnSessionTrackingFailedListener(this);
            config.SetOnSessionTrackingSucceededListener(this);

            // Set event callbacks.
            config.SetOnEventTrackingFailedListener(this);
            config.SetOnEventTrackingSucceededListener(this);

            // Set deferred deeplink callback.
            config.SetOnDeeplinkResponseListener(this);

            // Add session callback parameters.
            Adjust.AddSessionCallbackParameter("scp_foo", "scp_bar");
            Adjust.AddSessionCallbackParameter("scp_key", "scp_value");

            // Remove session callback parameters.
            Adjust.RemoveSessionCallbackParameter("scp_foo");
            Adjust.RemoveSessionCallbackParameter("scp_key");

            // Add session partner parameters.
            Adjust.AddSessionPartnerParameter("spp_a", "spp_b");
            Adjust.AddSessionPartnerParameter("spp_x", "spp_y");

            // Remove session partner parameters.
            Adjust.RemoveSessionPartnerParameter("scp_a");
            Adjust.RemoveSessionPartnerParameter("scp_x");

            // Clear all session callback parameters.
            Adjust.ResetSessionCallbackParameters();

            // Clear all session partner parameters.
            Adjust.ResetSessionPartnerParameters();

            Adjust.OnCreate(config);

            // Put the SDK in offline mode.
            // Adjust.SetOfflineMode(true);

            // Disable the SDK.
            // Adjust.Enabled = false;

            // Send push notification token once you have obtained it or when it changes the value.
            Adjust.SetPushToken("YourPushNotificationToken");

            RegisterActivityLifecycleCallbacks(new ActivityLifecycleCallbacks());
        }