evollu / react-native-fcm

react native module for firebase cloud messaging and local notification
MIT License
1.73k stars 682 forks source link

FCM.onEvent is not called when reopened normally #1017

Open sschiang opened 6 years ago

sschiang commented 6 years ago

It looks like

FCM.on(FCMEvent.Notification, notif => {...} )

is only called when the user presses the notification through the welcome screen or the tray, but not when the app is reopened from the main icon / screen. Is this expected behavior?

I have been incrementing the badges on unread chat messages through this call back but realize that it won't increment it when the user clicks through the normal menu icon.

Is this a bug? If not, is there recommended event to listen to? I can't seem to find one....