I'm trying to make an app that warns me when a current event is going to end. I have an entity (the event), with a date attribute - which is the end date for the event. How can I set a notification alert to pop up for like two days before the event ends? Any links to other tutorials or any hints will be much appreciated.
You can use Local Notifications for this.
http://developer.apple.com/library/ios/#DOCUMENTATION/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008194
Related
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.
We have a app with 3 different flavours. We set them up to use firebase notifications with one project per flavour. So 3 apps from the same codebase each one with there own firebase project.
We also added a custom event that we enabled for conversion.
For one of the apps, when sending pushes I can select the custom event to be used as a conversion event with the push, and that works and tracks fine. For the other two I can select the custom event fine but when I try to send the notification I get a error:
"Unable to reserve a user property for Notification conversion funnel analysis for"
Anyone know why this occurs and how to resolve it?
I fixed it by adding a user property to the user properties tab in the analytics section of firebase console. The user property had nothing to do with the actual conversion event but adding at least one user property seems to have initialised something that made the conversion event selectable.
I'm currently making a TODO app and I save the date that the user has to do a thing. Let's say that he saves the date 28-7-2016 to do something, I make another column tobenotified and I take the date minus it by 1 and save it, so the user should be notified the previous day that tomorrow has a thing to do.
But what if the user has closed the app(killed it). What is the proper way to send a notification from the Realm database when the date tobenotified is equal with NSDate() / the current date?
It's not as simple like that. Realm queries can neither match against a live-updating current date nor send notifications from the background.
You want to look into UILocalNotification and set it up with the tobenotified date as fireDate and schedule it locally. Note that you will require your users consent and have asked them initially by registering for local notification types so that you're permitted by the OS to schedule and present notifications. Also if the user can modify or delete a reminder, then you need to find a way to identify the notification via the the provided identifier and remove or re-schedule it accordingly.
What I'd like to do is to set-up a local notification in my iOS app which can remind me one hour ahead of a meeting, and gives me the distance between my current location and the location of the meeting. This means I need to update the alert message when the notification is fired. Is it possible to do it in iOS?
I found this related question how can i set alertbody text on runningtime when local notification is fired in ios4 develop?, but it's more than 2 years old. So I'm hoping there is at least some work-around to have such functionality.
According to the documentation :
The alert has a property for the message (the alertBody property) and for the title of the action button or slider (alertAction); both of these string values can be internationalized for the user’s current language preference.
Check here for some example
I am using the PIM Demo sample from Blackberry inside my application to add event to the device's calendar. The problem is there is no reminder or any dialog boxes popped up when the event starts.
Is there any way to set this manually? Or is there anything wrong with the programs?
I would like to have any form of reminder, could be an alarm, dialog box, or even just a notification will do.
Regards,
To have a reminder you must set the Event.ALARM field in the PIM Event to the number of seconds before the start of the event you want the remider:
Event.set(Event.ALARM, 0, 0, 900);
Will set a reminder for 15 minutes before the event.