Update MessagingService.java - #631
Conversation
Allow the app to receive notifications from the `FCMEvent.Notification` event in background mode even if the notification contains the 'notification' object. Normally this is intercepted by Firebase and the react native app will not receive notifications while the app is in background mode.
|
great. any docs when will this method be called? |
|
This overrides the Firebase handleIntent method. Normally Firebase will consume the notification if the So this will get called when every notification arrives. My situation was that I was providing large and small icons for the notification. And the back end (Firebase) is passing the |
|
this seems to be a breaking behavior which may cause FCM not work properly. For example this code may get skipped? The question is when will |
|
Do you propose moving the conditional from line 65 to wrap lines 69-72? |
|
In any case, any failure calls the super class function, which would then be the default behaviour (if this code was never added). |
|
I have same idea but in my test case, intent.getExtras() contains "gcm.notification.badge" instead of "badge". So your code might show notification but didn't parallel with handleBadge method. I agree with @evollu it might make FCM not work properly in some case. So i think we should only override handleIntent for updating badge number. This is my code in test case |
|
how about |
|
this patch not work with firebase latest version |
Allow the app to receive notifications from the
FCMEvent.Notificationevent in background mode even if the notification contains the 'notification' object. Normally this is intercepted by Firebase and the react native app will not receive notifications while the app is in background mode.