I'm trying to implement local notifications to my app. They will function as a reminder for an event, but the notifications must come from my app, and not from Calendar or Reminders.
My question is, how can I create notificaitons that fire before a certain date, while showing the actual date in the 'time-field'?
This is what the Calendar can do:
Notice the top right corner saying "in 5m".
I'm trying to get the same functionality for my own notifications, but I can't find anything about it. This is the only thing I can get:
As soon as the notification arrives, it says "Now", and then proceeds to count up the amount of minutes ago. I need it to be sent X minutes before, and count down to "Now", then count up. Is this possible?
How about you create multiple custom Notification.Name like this posting.
You could have .onTime, .fiveMinutesReminder, .tenMinutesReminder, and so on.
The logic in your app would set when to fire those reminders. Your selector handler function
would need to have some kind of switch statement
to handler different reminder. The handler will need to show different text message
based on the kind of the reminder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With