Exemple #1
0
        public M6SampleProvider(ITune tune, int playCursorTick, Action <int> update)
        {
            _tune   = tune;
            _update = update;

            _tune.FrameData.BeginChunkyRead(playCursorTick - _tune.StartTick);
            _tune.FrameData.ReadChunk(ref _subset);
        }
Exemple #2
0
        public M6SampleProvider(ITune tune, int playCursorTick, Action<int> update)
        {
            _tune = tune;
            _update = update;

            _tune.FrameData.BeginChunkyRead(playCursorTick - _tune.StartTick);
            _tune.FrameData.ReadChunk(ref _subset);

        }
Exemple #3
0
        public override void OnCreate()
        {
            base.OnCreate();
            //app init ...

            if (Build.VERSION.SdkInt >= BuildVersionCodes.IceCreamSandwich)
            {
                RegisterActivityLifecycleCallbacks(new TuneActivityLifecycleCallbacks());
            }

            tune = Tune.Init(this.ApplicationContext, TUNE_ADVERTISER_ID, TUNE_CONVERSION_KEY);
            tune.SetFacebookEventLogging(true, false);
            tune.RegisterDeeplinkListener(new TuneDeeplinkListener());
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            tune = Tune.Instance;

            //Create the user interface in code
            var layout = new LinearLayout(this);

            layout.Orientation = Orientation.Vertical;

            // Get our button from the layout resource,
            // and attach an event to it
            Button aButton = new Button(this);

            aButton.Text   = "Toggle Debug Mode";
            aButton.Click += (sender, e) => {
                isDebug = !isDebug;

                Log.Info(TAG, "SetDebugMode = " + isDebug);

                if (isDebug)
                {
                    TuneDebugLog.EnableLog();
                }
                else
                {
                    TuneDebugLog.DisableLog();
                }
            };
            layout.AddView(aButton);

            aButton        = new Button(this);
            aButton.Text   = "Test Session";
            aButton.Click += (sender, e) => {
                Log.Info(TAG, "MeasureSession");

                (tune as TuneInternal).MeasureSessionInternal();
            };
            layout.AddView(aButton);


            aButton        = new Button(this);
            aButton.Text   = "Test Event";
            aButton.Click += (sender, e) => {
                Log.Info(TAG, "Measure Event");

                tune.MeasureEvent("event1");
            };
            layout.AddView(aButton);

            aButton        = new Button(this);
            aButton.Text   = "Test Event With Items";
            aButton.Click += (sender, e) => {
                Log.Info(TAG, "Measure Event With Items");

                TuneEventItem item1 = new TuneEventItem("apple")
                                      .WithQuantity(1)
                                      .WithRevenue(0.99)
                                      .WithUnitPrice(0.99);
                TuneEventItem item2 = new TuneEventItem("banana")
                                      .WithAttribute1("attr1")
                                      .WithAttribute2("attr2")
                                      .WithAttribute3("attr3")
                                      .WithAttribute4("attr4")
                                      .WithAttribute5("attr5");

                List <TuneEventItem> list = new List <TuneEventItem>();
                list.Add(item1);
                list.Add(item2);

                TuneEvent tuneEvent = new TuneEvent("checkout").WithEventItems(list);

                tune.MeasureEvent(tuneEvent);
            };
            layout.AddView(aButton);

            aButton        = new Button(this);
            aButton.Text   = "Test Setters";
            aButton.Click += (sender, e) => {
                Log.Info(TAG, "Test Setters");

                tune.UserId       = "user123";
                tune.ExistingUser = false;
            };
            layout.AddView(aButton);

            aButton        = new Button(this);
            aButton.Text   = "Test Getters";
            aButton.Click += (sender, e) => {
                Log.Info(TAG, "Test Getters");

                String tuneId    = tune.MatId;
                String openLogId = tune.OpenLogId;

                String tuneData = "\nmatId = " + tuneId
                                  + "\nOpenLogId = " + openLogId;

                Log.Info(TAG, tuneData);
            };
            layout.AddView(aButton);

            SetContentView(layout);
        }
 public RenderedToDimensions(ITune tune, WaveformDimensions dimensions)
 {
     this.Tune       = tune;
     this.Dimensions = dimensions;
 }