Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

userInfo of LocalNotification is null

$
0
0
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?

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>