I want to avoid to display a local scheduled notification if the user has disabled notification from the app settings.
However, it doesn't seem possible.
I have think about two possible solution, but i don't know how to do it:
- Like a remote data notification, which is not displayed into the notification center if you don't manually do it, does we have an equivalent mechanism for local notification ?
- Another solution would be to be able to listen "app notification setting change", but i've not find any information about it.
For the moment, my best solution is too check getNotificationSettings
each time the app come back in foreground. if status isn't authorized
, then i call removePendingNotificationRequests
.
However, if user don't open the app before the scheduled event is fired, this workaround isn't sufficient.