Time based notification



i’m new into development with ionic and need some help to build a required case.
i need to show a notification wich popup at a specific time. eg. everyday at 22:15
any tips?


I think your best best is to use $setInterval every minute or two, and then compare against current time. If it is the time you need, then fire off your pop-up.


hi & thank you for your answer.
is this really the right way to do this? it seems a bit to ressource intensive to me… maybe i’m wrong… :frowning:
i’ll try



On iOS at least, the ‘correct’ way to do this, would be a local notification, which can be scheduled for a specific time. To use it in Ionic on Phonegap / Cordova, you would need to use a local notification plugin.


@miklernout Thanks for the input. That’s a great idea. I wasn’t familiar with local notification.

With my suggestion, it would only work if the app was actually in use at the designated time. $setInterval wouldn’t run when an app was backgrounded.


thanks for the inputs. i’ll try it this week