public static void AddScheduledNotificaion(int notificationId)
        {
            List <int> scheduledNotificaions = NotificationIdHandler.GetScheduledNotificaions();

            scheduledNotificaions.Add(notificationId);
            NotificationIdHandler.SetScheduledNotificaions(scheduledNotificaions);
        }
        public static void RemoveScheduledNotificaion(int id)
        {
            List <int> scheduledNotificaions = NotificationIdHandler.GetScheduledNotificaions();

            scheduledNotificaions.RemoveAll((int i) => i == id);
            NotificationIdHandler.SetScheduledNotificaions(scheduledNotificaions);
        }
        public static int GetNotificationId()
        {
            List <int> scheduledNotificaions = NotificationIdHandler.GetScheduledNotificaions();
            int        num;

            do
            {
                num = Random.Range(0, int.MaxValue);
            }while (scheduledNotificaions.Contains(num));
            return(num);
        }
Example #4
0
        public static int GetNotificationId()
        {
            int        num;
            List <int> scheduledNotificaions = NotificationIdHandler.GetScheduledNotificaions();

            while (true)
            {
                num = UnityEngine.Random.Range(0, 2147483647);
                if (!scheduledNotificaions.Contains(num))
                {
                    break;
                }
            }
            return(num);
        }