0

According to this, when the message is both a notification and data message and the app is in the background, the message is received as follows:

Notification: system tray
Data: in extras of the intent.

Which intent is it refering to?

From the Firebase Notification Console I sent a message with Custom data, ie with some Key/Value. Is this considered a combined Notification and Data message? My onMessageReceived event does not fire when the app is in the background. Only the notification shows in the Notification bar at the top.

AL.
  • 36,815
  • 10
  • 142
  • 281
Old Geezer
  • 14,854
  • 31
  • 111
  • 198

1 Answers1

1

Which intent is it refering to?

The intent that starts the activity. See my answer here.

From the Firebase Notification Console I sent a message with Custom data, ie with some Key/Value. Is this considered a combined Notification and Data message?

Yes. See my answer here.

AL.
  • 36,815
  • 10
  • 142
  • 281
  • Thanks. For the first question, does it mean that the app won't know about the message until it is launched to the foreground? – Old Geezer Sep 06 '17 at 16:24
  • Yup. The intial message contained in the `notification` message will only be handled by the Android system tray, not your client app. – AL. Sep 06 '17 at 17:31