Closed yyankov closed 7 years ago
Not sure what's the exact solution you are looking for, but you can simply put the LocalNotifications.schedule(...) call within an if block which checks the condition you are looking for. So only if the condition is met, it'll schedule the notification.
Thanks for the tip. Unfortunately that would only do the job if the check could be made at the time that the notification is fired.
For example: at 1 PM the app won't have a way to know if a notification will be needed at 5 PM. So I was wondering if that is possible only with local notifications (without backend logic and push notification).
Nope.
Hey Eddy,
Sorry to comment on this old thread. Within the schedule-function it would be awesome if you could check a condition before firing the notification. I have a scenario where i want to schedule a notification every x-minutes if a specific condition is met. Do you have any ideas on how i could go about this?
Cheers, Lasse
Hi,
I need to show a local notification only if a certain condition is met. Is it possible create conditional local notifications?