Open haggholm opened 6 years ago
can you check FCM.on('notification' callback? if app is in background, it might be possible that the notification goes there
The notification callback gets the proper events when the GCM message is sent, but when the app is opened, there are no data. I suppose I could cache the results of the last received GCM notification, but then how do I tell what notification was clicked to open the app?
Or maybe I misunderstand?
did you send custom_notification together with notification payload?
Did you fixed this? I have the same problem
@evollu No, I was sending only custom_notification
for Android devices (as I believe the documentation directs).
(Apologies for late answer, I had moved onto other things and missed the notification.)
can you post your payload here?
react-native@0.48.4
react-native-fcm@9.7.0
Our app works fine with ordinary GCM notifications, but I wanted to use the
custom_notification
feature in order to run some logic on receiving background messages. However, when the app ‘wakes up’ on clicking either the library’s generated notification, or a manually created local notification viaFCM.presentLocalNotification()
, the notification that arrives throughFCM.getInitialNotification()
contains no data: only the flagopened_from_drawer
and an emptyfcm: {}
. I’ve previously seen that when I had misconfigured the Android manifest and the intent matching theclick_action
was not associated with the main activity; but as mentioned above, it’s now working fine with regular GCM notifications.