Hi
I have scheduled a notification as
UnityEngine.iOS.LocalNotification notification = new UnityEngine.iOS.LocalNotification();
DateTime now = System.DateTime.Now;
DateTime fireDate = DateTime.Now.AddMilliseconds(delayMs);
notification.fireDate = fireDate;
notification.alertBody = message;
notification.alertAction = title;
IDictionary newDict = new Dictionary();
newDict.Add("ID", id.ToString());
notification.userInfo = newDict as IDictionary;
UnityEngine.iOS.NotificationServices.ScheduleLocalNotification(notification);
But when I check, userInfo is null.
foreach (UnityEngine.iOS.LocalNotification notif in UnityEngine.iOS.NotificationServices.scheduledLocalNotifications)
{
if (notif.userInfo != null && notif.userInfo["ID"].Equals(id.ToString()))
{
UnityEngine.iOS.NotificationServices.CancelLocalNotification(notif);
}
}
Could somebody please help me in this?
↧