I have function in Firebase Cloud Functions which is used to send notifications to specific users within my app and has as the notificationContent
the following cod
If you want to use more customizable and advanced notification features.
You should only send FCM with data
payload, and create notification at android client side.
Remember that if you send FCM with notification
payload or notification
+ data
payload, the notification will be created by android core system and BroadcastReceiver
's onReceive
method won't being called if your app is on background.
If you send FCM with data
payload, it will call onReceive
all the time, so you can produce custom notification manually at android client side. (most app uses latter method.)
I hope this link would be helpful.