Question by
sreejit_730 · Jul 29, 2015 at 11:54 AM ·
notificationnotificationsnotificationservices
Sceduled local notifications in iOS
I cannot find a proper tutorial on sending scheduled local notifications
I came up with this but below code is not workingit is not working
void Start ()
{
LocalNotification notif = new LocalNotification();
notif.fireDate = System.DateTime.Now.AddSeconds(5f);
notif.alertBody = "Hey";
NotificationServices.ScheduleLocalNotification(notif);
}
Please help me with this
Comment
If you are looking for cross platform solution, here is one plugin which does on iOS and Android. Cross Platform Native Plugins
Answer by ashwinFEC · Feb 10, 2016 at 09:07 AM
I know this is an old post so this is for the people who arrived here from Google, like I did. You need to register for notifications before you schedule a notification.
void Awake() {
NotificationServices.RegisterForNotifications(
NotificationType.Alert |
NotificationType.Badge |
NotificationType.Sound);
}
I m getting some issue and then I tried your idea but does not work. Anybody help ?