コード例 #1
0
        public static eNotificationRepeatInterval ConvertToRepeatInterval(CalendarUnit _unit)
        {
            switch (_unit)
            {
            case CalendarUnit.Minute:
                return(eNotificationRepeatInterval.MINUTE);

            case CalendarUnit.Day:
                return(eNotificationRepeatInterval.DAY);

            case CalendarUnit.Week:
                return(eNotificationRepeatInterval.WEEK);

            case CalendarUnit.Month:
                return(eNotificationRepeatInterval.MONTH);

            case CalendarUnit.Year:
                return(eNotificationRepeatInterval.YEAR);

            default:
                return(eNotificationRepeatInterval.NONE);
            }
        }
コード例 #2
0
		public static eNotificationRepeatInterval ConvertToRepeatInterval (CalendarUnit _unit)
		{
			switch (_unit)
			{
			case CalendarUnit.Minute:
				return eNotificationRepeatInterval.MINUTE;

			case CalendarUnit.Day:
				return eNotificationRepeatInterval.DAY;

			case CalendarUnit.Week:
				return eNotificationRepeatInterval.WEEK;

			case CalendarUnit.Month:
				return eNotificationRepeatInterval.MONTH;

			case CalendarUnit.Year:
				return eNotificationRepeatInterval.YEAR;

			default:
				return eNotificationRepeatInterval.NONE;
			}
		}
コード例 #3
0
    public void makeRepeatingNotificationiOS(string title, string content, int delay, UnityEngine.iOS.CalendarUnit u)
    {
        UnityEngine.iOS.LocalNotification n = new UnityEngine.iOS.LocalNotification();

        n.fireDate       = System.DateTime.Now.AddSeconds(delay);
        n.repeatInterval = u;
        n.alertBody      = content;
        n.hasAction      = true; //Set that pushing the button will launch the application
        UnityEngine.iOS.NotificationServices.ScheduleLocalNotification(n);
    }