コード例 #1
0
        private void Init(RequestRepository requestRepo, ViewEventRepository viewEventRepo,
                          NonViewEventRepository nonViewEventRepo, Dao <ConfigEntity> configDao, EventNumberInSameSessionHelper eventNumberInSameSessionHelper)
        {
            var countlyUtils = new CountlyUtils(this);
            var requests     = new RequestCountlyHelper(Config, countlyUtils, requestRepo);

            Events             = new EventCountlyService(Config, requests, viewEventRepo, nonViewEventRepo, eventNumberInSameSessionHelper);
            OptionalParameters = new OptionalParametersCountlyService();
            Notifications      = new NotificationsCallbackService(Config);
            var notificationsService = new ProxyNotificationsService(Config, InternalStartCoroutine, Events);

            _push   = new PushCountlyService(Events, requests, notificationsService, Notifications);
            Session = new SessionCountlyService(Config, _push, requests, OptionalParameters, eventNumberInSameSessionHelper);

            Consents     = new ConsentCountlyService();
            CrashReports = new CrashReportsCountlyService(Config, requests);

            Device         = new DeviceIdCountlyService(Session, requests, Events, countlyUtils);
            Initialization = new InitializationCountlyService(Session);

            RemoteConfigs = new RemoteConfigCountlyService(Config, requests, countlyUtils, configDao);

            StarRating     = new StarRatingCountlyService(Events);
            UserDetails    = new UserDetailsCountlyService(requests, countlyUtils);
            Views          = new ViewCountlyService(Config, Events);
            _inputObserver = InputObserverResolver.Resolve();
        }
コード例 #2
0
        internal IOsNotificationsService(CountlyConfigModel config, Action <IEnumerator> startCoroutine, EventCountlyService eventCountlyService)
        {
            _config              = config;
            _startCoroutine      = startCoroutine;
            _eventCountlyService = eventCountlyService;

            var gameObject = new GameObject(BridgeName);

            _bridge        = gameObject.AddComponent <IOSBridage>();
            _bridge.Config = _config;
        }
コード例 #3
0
        internal AndroidNotificationsService(CountlyConfigModel config, EventCountlyService eventCountlyService)
        {
            _config = config;
            _eventCountlyService = eventCountlyService;

            var gameObject = new GameObject(BridgeName);

            _bridge        = gameObject.AddComponent <AndroidBridge>();
            _bridge.Config = _config;

            var countlyPushPlugin = new AndroidJavaClass(CountlyPushPluginPackageName);

            countlyPushPlugin.CallStatic("setEnableLog", config.EnableConsoleLogging);
        }
コード例 #4
0
        internal ProxyNotificationsService(CountlyConfigModel config, Action <IEnumerator> startCoroutine, EventCountlyService eventCountlyService)
        {
#if UNITY_ANDROID
            _service = new Notifications.Impls.Android.AndroidNotificationsService(config, eventCountlyService);
#elif UNITY_IOS
            _service = new Notifications.Impls.iOs.IOsNotificationsService(config, startCoroutine, eventCountlyService);
#endif
        }