79357231

Date: 2025-01-15 06:35:06
Score: 3.5
Natty:
Report link

I started to recently face the same issue... But I tried to debug the code and found out that onMessageReceived is never called in my FCM Service class when the app is in the background. This happens when the FCM message payload from the server includes a notification attribute.

Replaced server side code to send a data payload instead of notification and now my onMessageReceived method is always called be the app is in the foreground or background.

More details here -

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): face the same issue
  • Low reputation (1):
Posted by: vamsi krishna