Example #1
0
        /// <summary>
        ///     Sends a queue of notifications to the client
        /// </summary>
        public void Send()
        {
            Reset();
            foreach (var stamp in Enum.GetValues(typeof(IterationStamp)).Cast <IterationStamp>())
            {
                var notification = _notifications
                                   .FirstOrDefault(x => x.Condition.Invoke(stamp, _manny.Attribute));
#if UNITY_ANDROID
                NotificationUtil.Send(TimeSpan.FromMinutes((int)stamp), notification.Message);
#endif
#if UNITY_IPHONE
                var iosNotification = new LocalNotification {
                    fireDate    = DateTime.Now.AddMinutes((int)stamp),
                    alertBody   = notification.Message,
                    alertAction = "Manny"
                };
                NotificationServices.ScheduleLocalNotification(iosNotification);
#endif
            }
        }