I know that process messages in the background application
When your application is in the background, Android sends notifications to the system tray. The user, by clicking on the notification, opens the default application launcher.
This includes messages that contain both the notification payload and data. In these cases, a notification is delivered to the deviceβs system tray, and a data payload is delivered in addition to the purpose of your launch activity.
but my application must detect when a notification arrives in order to perform the operation (to receive data from the server), because when the notification arrives, it is necessary to download the data, but when the application is in the background I cannot know that the notification arrives until the user notification notification will be open, and I will upload the data, but in some cases the user does not click on the notification, so the data does not load
so my question is KNOW in any way when the application receives a notification in case the application is in the background?
source share