I am using fcm in my cordova based app and it mostly works, however sometimes the push messages don't get delivered to the device although the api call on server returns success. This primarily happens on xiaomi phones if the app is closed for about 10-12 hours. It feels like after some time the phone will close any and all background activity for the app causing this issue. Once the app is restarted, the push messages start coming normally. Any suggestions?
Asked
Active
Viewed 1,144 times
1 Answers
0
The Firebase documentation explain that:
When an app server posts a message to FCM and receives a message ID back, it does not mean that the message was already delivered to the device. Rather, it means that it was accepted for delivery. What happens to the message after it is accepted depends on many factors.
So, when you're calling the api with success return it doesn't mean the message got delivered.
FCM is still suffering with reliability issues: How reliable is Firebase Cloud Message?
On Xiaomi devices, FCM is get killed due their custom Android tweaks to improve the overall battery life. Read more at Xiaomi does not receive notification when application is not running

ישו אוהב אותך
- 28,609
- 11
- 78
- 96
-
1But is there a way to fix it? like somehow be able to restart the FCM process periodically or if it is killed? – Btdev Aug 20 '17 at 20:11