Firebase notification not working properly using FCM service - push-notification

Sometimes FCM sending messaging and sometime delay occurs or never received on the devices.
if FCM is not reliable then please suggest the alternatives for push notifications.

FCM creating notification issue on the following devices,
iPhone 6 connected to Xcode receives the notification
iPhone 6 running testflight version receives the notification
iPhone 6 running app store version receives the notification
iPhone 6 Plus connected to Xcode receives the notification
iPhone 6 Plus running testflight version receives the notification
iPhone 6 Plus running app store version receives the notification
iPhone X running testflight version does NOT receives
Solution:
For some reason, the iPhone X needs that the payload contains "notification: {"title":"xxx", "body":"xxx"}" which makes no sense since the iPhone 6 and iPhone 6 plus can receive a push notification without that added payload... The problem now is that adding "notification" to the payload will make iOS show the notification on tray immediately upon receiving it, witch beats the purpose of the "silent" notification I want to deliver.
Here's the previous payload that don't work on iPhone X but works on iPhone 6 and iPhone 6 plus(FCM takes care of adding the content-available tag):
{"message": {"token" : "eANw_OLOKXc:APA.....XsMg", "data" : {"content" : "2546|N|495....arg|BATTERY|||||"}}}
And here's the one that works with iPhone X and set the priority to high at backend.
{"message": {"token" : "eANw_OLOKXc:APA.....XsMg", "notification":{"title":"xxx","body":"xxx"},"data" : {"content" : "2546|N|495....arg|BATTERY|||||"}}}

Related

Can't recieve notifications when Mobile phone is turned on from shutdown state

I'm working on an app that receives notifications using Firebase Cloud Messaging in flutter.
I can receive notifications in Background, Terminated, and Foreground perfectly.
However, when I try to turn off(Shut it down) my phone and send notifications from FCM Console I only receive the latest sent notification or sometimes I don't receive anything at all.
For example, I sent 4 notifications from the FCM console when my Phone is shut down(dead) when I turn it on again. Instead of receiving 1, 2, 3, 4 notifications I only receive the last notification 4 and sometimes none at all!
Any links to read and any details as to why this behaviour is occuring is a very big help.

FCM push notifications are not appearing in background in android 8.0 Oreo device

I've installed and configured all the requirements of FCM on client and server(node-fcm) both and sending push notification successfully whenever I want in all devices, but when I'm sending to Android 8.0 device its coming within app when app is opened while not coming in background when app is closed. Kindly anyone who can help me in this or tell if FCM has updates for oreo or not, or this is a bug.
Thanks

Can i embed image or movie in iOS 10 push notification message

I often read that iOS 10 supports this feature now and that their push notification payload is increased in size but never seen it implemented in any mobile app so far. So anybody knows if that is implemented in any app so far ?
Yes, totally. Starting from iOS 10+ you can now send and receive push notifications with Media. Media means an URL to photo, video or etc.

FCM behavior when offline for iOS

I'm having trouble figuring out how FCM behaves when I send a notification to an iOS device that is offline (e.g. in airplane mode, or turned off).
The documentation on the time_to_live property mentions that Currently, time_to_live is not supported for notification messages on iOS. but doesn't provide an explanation of what is done instead. I've tried testing it, and it seems like a push notification sometimes goes through, and sometimes does not, regardless of what I set the time_to_live property to be, although I'm not sure if that's due to throttling or something else happening on the FCM side.
Relatedly, I can't seem to get the delay_while_idle property to work on iOS, although the documentation does not explicitly mention that it isn't available for iOS - notifications that are sent while the phone is asleep still wake the phone, even if I set delay_while_idle to be true.
Does anyone have any insight into how this is supposed to work?
The time_to_live is AFAIK applicable to both Android and iOS. However, since the process of sending the message to iOS devices for FCM goes like this:
App Server > FCM Server > APNs > iOS device
It is safe to say that only the FCM Server makes use of the time_to_live, as per it's description:
This parameter specifies how long (in seconds) the message should be kept in FCM storage if the device is offline. The maximum time to live supported is 4 weeks, and the default value is 4 weeks. For more information, see Setting the lifespan of a message.
Looking around, the behavior for APNs when sending to offline devices is (from the Apple docs):
Apple Push Notification service includes a Quality of Service (QoS) component that performs a store-and-forward function. If APNs attempts to deliver a notification and the destination device is offline, APNs stores the notification for a limited period of time and delivers it when the device becomes available again. This component stores only the most recent notification per device and per app. If a device is offline, sending a notification request targeting that device causes the previous request to be discarded. If a device remains offline for a long time, all its stored notifications in APNs are discarded.
As of now, delay_while_idle is now deprecated.
The way I know that you could do to wake up an iOS phone (online/connected to a decent network) is to simply set the priority to high.

Launch application automatically from a push notification on Windows 10 Mobile?

This is a reboot of question Launch application automatically from a push notification on Windows Phone 8 but for Windows 10 Mobile.
Is there any positive development on this in Windows 10 Mobile?
It's basically the same as on Windows Phone 8.1.
You cannot directly launch an app into the foreground on receiving a push notification, but you can trigger a background task by push notification. The task can then decrypt the payload and fire a toast and tile notification to display it to the user. For a long message the toast can let the user launch the app to view the full message.
See Background tasks triggered by raw notifications in MSDN.
The Raw notifications sample demonstrates this for Windows and Windows Phone 8.1.

Resources