I use Expo (SDK 39) and FCM. I have to process data messages, regardless of state (foreground, background, killed, phone locked).
When a new data message arrives, I must process the data and perform an action (example: play a sound, like an alarm). Automatically, without prior user interaction.
I've been searching for hours but I can't find anything. The docs don't talk about some way of creating a listener for background (addNotificationResponseReceivedListener needs user interaction, it doesn't work for me)