-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Hello @morganchen12 / Everyone,
I cannot receive the FCM push when the app is closed/killed. I receive the notifications when the app is in foreground or background, but I also want to receive like how whatsapp/facebook notify even when the app is closed.
I can get the notifications in this scenario if i directly publish it from the FCM console, but I can't get the notification when server tries to push.
This is the aps dictionary at the server side:
{
"to":"fcm device token",
"data":
{"title":"Exclusive Offers at CF Masonville Place",
"body":"Look for the 'CF NOW Zone' signs across the mall ...",
"sound":"default",
"click_action":"Launch"
},
"notification":
{"title":"Exclusive Offers at CF Masonville Place",
"body":"Look for the 'CF NOW Zone' signs across the mall ...",
"sound":"default",
"click_action":"Launch"
},
"content_available":true,
"priority":"high",
}
Also, want to point out that I receive a push notification when publishing from the firebase console with "content_available" key set to true.(Also works without the key from the console)
Any help would be greatly appreciated. Thanks