Closed leventyildirim61 closed 4 years ago
+1
Create an app exit listener and fire:
PushNotifications.cancelAllLocalNotifications()
@devlargs Thanks for tip, but how? How to create an exit listener? And why call PushNotifications.cancelAllLocalNotifications() if this function remove all listeners? Could you explain better or give an example?
Hi. I surely misunderstood this one. I thought you're saying how to remove a notification after you close the app.
If you are going to push a notification when the app is closed, you need another plugin for that. As for what I am using:
https://github.com/jamesisaac/react-native-background-task. (but the task fires for a minimum time of 7m30s).
But if you are going to fire a notification from one phone to another phone (like chatting... etc), Im not sure that feature is supported yet.
See also: https://github.com/zo0r/react-native-push-notification/issues/219
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.
Hello.
How to handle notification when app is closed(not background mode)