If the application is in the foreground I am able to customize the notification though I read when app is backgrounded. The FCM handles the notifications by default(Does that mean we can not customize those notifications?)
Asked
Active
Viewed 45 times
0
-
1It's possible. Just use a `data`-*only* message payload. – AL. Mar 13 '17 at 02:17
-
1See http://stackoverflow.com/questions/37711082/how-to-handle-notification-when-app-in-background-in-firebase/38795553#38795553 – Frank van Puffelen Mar 13 '17 at 02:22
-
What you want to costumize exactly? – Merlí Escarpenter Pérez Mar 13 '17 at 09:42
1 Answers
0
By default you will receive:
"notification":{
"title": "Awesome notif!",
"body": "Test notif"
}
This one will be handle only when you're in foreground.
if you send:
"data":{
"title": "Awesome notif!",
"body": "Test notif"
},
it will be handle by both background and foreground.
I highly recommend you to read this article it explains everything you have to know about that.

agonist_
- 4,890
- 6
- 32
- 55