I am implementing FCM notifications in Android, but how does notifications differ depending on the app status (background vs. foreground)?
FCM notification messages
don't support the largeIcon or bigPicture.
if you need them while in background you can use a FCM data message
.
For data messages the onMessageReceived(message)
method is always called, so you can use the message.getData()
method and create your custom notification.
Read more about notification messages vs data messages here: https://firebase.google.com/docs/cloud-messaging/concept-options#notifications_and_data_messages