//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); }
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 }