There's been trending topics about Firebase Cloud Messaging that Data Payload message is not fired from onMessageReceived()
method for some lower-end devices. And it's true. Here is the result:
App getting killed scenario:
Devices got data payload:
Devices didn't get data payload:
Be ensured that I'm not sending notification key from Server/Postman.
I am looking for the solution, I got data payload from Firebase including all types of devices, OS & obviously from API level 15. My Postman details are as follows.
{
"registration_ids": ["fC5uxGSRCsg:APA91bHh9fMXQ41LpX6tjjSsBKGrKTWYpzKimLDzvBGSHDPo2pq87JHqogUp2kqrmJi06siG_p6DfgRCim23iFzlBQAIrgtMDqRW4s39zUqv9CzyPqzxVl5PtnHPRDs4OagTuTePNyDI"],
"data": {
"title" : "my_custom_value",
"message" : "tekksdasdasdsa",
"isBackground" : "",
"payload" : {
},
"timestamp" : "",
"imageUrl" : "",
}
}
In some devices Like MI you will not receive Notification if the application is removed from application tray! but you will receive notifications if you killed an activity and haven't removed from application tray!
In Xiaomi phones, they whitelist or blacklist an app based on certain criteria. If you download an app and if it is in their whitelist, they'll permit the app to show notifications.
How to Test:-
Try testing your app after killing your app activities rather removing from app tray if that works fine , thats all you could do at your end!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With