Exemplo n.º 1
0
        public void PushOldNotification(int EmpID, String token)
        {
            var notification = from n in db.Notifications where n.EmployeeId == EmpID select n;

            if (notification != null)
            {
                foreach (Notification n in notification)
                {
                    List <String> myData = new List <string>();
                    myData.Add(n.Intent);
                    myData.Add(n.PageHeader);
                    myData.Add(n.PageId);
                    myData.Add(n.ExtraDetail);
                    fcm.PushFCMNotification(n.Title, n.Body, token, myData);
                    DeleteOldNotifications(n.NotificationId);
                }
                db.SaveChanges();
            }
        }