コード例 #1
0
 private void Process(AndroidNotification n1, RetentionNotification n2)
 {
     n1.Title     = n2.title;
     n1.Text      = n2.message;
     n1.SmallIcon = "ic_wrench";
     n1.LargeIcon = n2.icon;
     n1.Style     = NotificationStyle.BigTextStyle;
 }
コード例 #2
0
 private void Process(NotificationParams p, RetentionNotification note)
 {
     p.Title     = note.title;
     p.Message   = note.message;
     p.SmallIcon = icon;
     p.LargeIcon = note.icon;
     p.Vibrate   = false;
     p.Multiline = true;
     p.Repeat    = true;
 }
コード例 #3
0
        public void ScheduleDebug(RetentionNotification note)
        {
            var n = new AndroidNotification
            {
                FireTime       = DateTime.Now.AddSeconds(10),
                RepeatInterval = TimeSpan.FromMinutes(1)
            };

            Process(n, note);
            AndroidNotificationCenter.SendNotification(n, channelId);
        }
コード例 #4
0
        public void Schedule(DayOfWeek day, RetentionNotification note, DateTime date)
        {
            var n = new AndroidNotification
            {
                FireTime       = date,
                RepeatInterval = TimeSpan.FromDays(7)
            };

            Process(n, note);
            AndroidNotificationCenter.SendNotification(n, channelId);
        }
コード例 #5
0
        public void ScheduleDebug(RetentionNotification note)
        {
            var notificationParams = new NotificationParams
            {
                Id             = GetId(100),
                Delay          = TimeSpan.FromSeconds(10),
                ExecuteMode    = NotificationExecuteMode.ExactAndAllowWhileIdle,
                RepeatInterval = TimeSpan.FromSeconds(30)
            };

            Process(notificationParams, note);
            NotificationManager.SendCustom(notificationParams);
        }
コード例 #6
0
        public void ScheduleDebug(RetentionNotification note)
        {
            var ln = new UnityEngine.iOS.LocalNotification
            {
                alertTitle = note.title,
                alertBody  = note.message,
                fireDate   = DateTime.Now.AddSeconds(15),
                applicationIconBadgeNumber = 1,
                repeatInterval             = CalendarUnit.Minute
            };

            NotificationServices.ScheduleLocalNotification(ln);
        }
コード例 #7
0
        public void Schedule(DayOfWeek day, RetentionNotification note, DateTime date)
        {
            var ln = new UnityEngine.iOS.LocalNotification
            {
                alertTitle = note.title,
                alertBody  = note.message,
                fireDate   = date,
                applicationIconBadgeNumber = 1,
                repeatInterval             = CalendarUnit.Week
            };

            NotificationServices.ScheduleLocalNotification(ln);
        }
コード例 #8
0
        public void Schedule(DayOfWeek day, RetentionNotification note, DateTime date)
        {
            var delay = date - DateTime.Now;
            var notificationParams = new NotificationParams
            {
                Id             = GetId((int)day),
                Delay          = delay,
                ExecuteMode    = NotificationExecuteMode.Inexact,
                RepeatInterval = TimeSpan.FromDays(7)
            };

            Process(notificationParams, note);
            NotificationManager.SendCustom(notificationParams);
        }
コード例 #9
0
 public void Schedule(DayOfWeek day, RetentionNotification note, DateTime date)
 {
     throw new NotImplementedException();
 }
コード例 #10
0
 public void ScheduleDebug(RetentionNotification note)
 {
     throw new NotImplementedException();
 }