I'm currently developing an app for a client, and one of its requirements is to handle notification data from FCM. I read the FCM docs and to handle FCM data when the app is background/closed, I'm using the getIntent().getExtras() method. However, this will only work if and only if the user taps the notification banner. So, if the user ignores the notification banner and launches the app on the home screen, there is no way of getting the data from the system tray.
So, is there a way to get the data from the system tray without tapping the notification banner?
I tried investigating other android apps' behavior, like Gmail and Outlook, by sending an email while the apps are closed. When a notification is prompted, I put my phone in airplane mode and launch the app without tapping the notification banner. Somehow the app was able to get the email. So is this data from the system tray's notification? or a query from a server (I don't know if a post request from a server is possible since the app is in the background).
If anyone can explain or give a solution, it will be a big help for my project.