//public MessagingService(IServiceProvider serviceProvider, QueueFile fileQueue)
        //{
        //    _serviceProvider = serviceProvider;
        //    _fileQueue = fileQueue;
        //}

        public async Task Run(MessagingConfiguration config, CancellationToken token)
        {
            _messagingListener = new MessagingListener(config.ListenerPort, this);
            await _messagingListener.Run(token);
        }
Example #2
0
        public static void RegisterForMessagingEvents()
        {
            #if UNITY_ANDROID
            if (_messagingListener == null)
                _messagingListener = new MessagingListener();

            LocalyticsClass.CallStatic("addMessagingListener", _messagingListener);
            #elif UNITY_IOS
            _registerReceiveMessagingCallback (ReceiveMessagingMessage);
            #else
            throw new NotImplementedException("Localytics Unity SDK only supports iOS or Android");
            #endif
        }