Alert user of incoming event

Hello, i want to notify my app user of a incoming event, with a time offset defined by him. Like, if the user selects ‘5 days’, i want to warn him (maybe a push notification) when that time interval has come, but i want to do it repeatedly, so after 5 days, i want to do it again after another 5 days.

I don’t know if i made myself clear, but think of it as a scheduled event or something. I want it to fire every XX days/weeks/months, for a undefined time.

What would be the best approach, using Ionic, Angular and Parse as a database?

Hi,

For notification you can use this Cordova Plugin,
https://github.com/katzer/cordova-plugin-local-notifications

I use it and I work very well.

Thank you for the answer, i have been trying to use it, and so far, really great. I am only having trouble with the scheduled notifications… I have only been able to schedule one for the next day, is there someway to schedule a notification for like, 2 minutes from now? And, another question, if i schedule a notification for tomorrow, and close the app, will it still be displayed?
Thank you :slight_smile:

I think for the best experience you will have to go with a hard way. managing schedules on server and sending out push notification through something like parse.com

I have tried using Parse Push (i am using Parse as a databse haha), but with no success so far. I can’t get it to work on a Ionic Project, i don’t know what file to put the “sender id” and “google key” (i have them both, in my google developers console). But the only guide i found about parse push is about the native java in android, and on javascript, i can’t get it to work…

Do you know any guides for Parse Push in Ionic apps?

Cheers,
Bruno

You can set repetition either ‘secondly’, ‘minutely’, ‘hourly’, ‘daily’, ‘weekly’, ‘monthly’ or ‘yearly’ and specify date and time.
When you close your App there is a notification in status bar.

Yeah, i have just found that out. But still, i want a variable on the repetition, like, every 25 days or every 27 days, and i want to be able to change that dinamically too…

It is’nt possible directly. But you can make it by soft with many notifications. I used this method for my App.

Well… Are you saying i need to create a notification, set a ‘timer’ or compare dates, that when the date i want has come, i destroy that notification (on user click) and create a new one? Isn’t this a bit hackish? Or will this be good?

No I create all notifications at once or you can use this

Custom repeating interval on Android
To specify a custom interval, the repeat property can be assigned with an number in minutes.
/**

  • Schedules the notification quarterly every 15 mins
    */
    window.plugin.notification.local.add({ repeat: 15 });
1 Like

Thank you jimibi! That custom interval is exactly what i was looking for! Going to try it now. Thanks for the awesome community support :wink:

Works like a charm!! Thank you jimibi!