I know that Handle messages in a backgrounded app
When your app is in the background, Android directs notification messages to the system tray. A user tap on the notification opens the app launcher by default.
This includes messages that contain both notification and data payload. In these cases, the notification is delivered to the device's system tray, and the data payload is delivered in the extras of the intent of your launcher Activity.
but my app should detect when notification arrive to do operation (get data from server) because when notification arrive must load data but , when app in background i cannot know notification arrive till user click notification will app open and i will load data , but in some case user not click notification so data not loaded
so my question any way to KNOW when app receive notification in case app in background ?