I am using Firebase for push notifications. However, I have noted that when a message is pushed and my app is open (in the foreground), the FirebaseMessaging service's fm_MessageArrived is triggered and it works as expected.
However, quite oddly, this method does not seem to be triggered when my app is in the background (no activity visible). I have tested this in debug by setting a breakpoint in the service and in release by adding log statements. This method is not called BUT I can see a notification is indeed created and displayed in the notifications bar. Because of the fm_MessageArrived event not being raised, I cannot add the relevant information to the app (i update a process global in Main in this method).
How do I understand this behaviour? My device is Nexus 5X running 7.1.1.
Thanks for your help in advance.