Exemplo n.º 1
0
        public void Load()
        {
            Mvx.CallbackWhenRegistered <IMvxMainThreadDispatcher>(service =>
            {
                if (CurrentActivity == null)
                {
                    Mvx.Resolve <IMvxAndroidActivityLifetimeListener>().ActivityChanged += Handle_ActivityChanged;
                }
                else
                {
                    service.RequestMainThreadAction(() =>
                    {
                        var config = Mvx.Resolve <IAFConfigService>().Config;

                        AppsFlyerLib.Instance.StartTracking(CurrentActivity.Application, config.DevKey);

                        _trackerDelegate = new CustomAppsFlyerConversionDelegate();

                        AppsFlyerLib.Instance.RegisterConversionListener(Application.Context, _trackerDelegate);

                        Mvx.RegisterSingleton <IAppsFlyerService>(() => new AppsFlyerService());
                    });
                }
            });
        }
Exemplo n.º 2
0
        public void Load()
        {
            var config = Mvx.Resolve <IAFConfigService>().Config;

            AppsFlyerLib.Instance.StartTracking(CurrentActivity.Application, config.DevKey);

            _trackerDelegate = new CustomAppsFlyerConversionDelegate();

            AppsFlyerLib.Instance.RegisterConversionListener(Application.Context, _trackerDelegate);

            Mvx.RegisterSingleton <IAppsFlyerService>(() => new AppsFlyerService());
        }