-
Notifications
You must be signed in to change notification settings - Fork 1
Does order of FcmMessageResultItems in the FcmMessageResponse corresponds to the order of registrationIds provided in the constructor of NotificationMulticastMessage #30
Comments
Hello Slav (I am Fran, from Brno office), Take a look into this thread, I think it will answer your question (looks like the order is the same):
But, regarding to the Canonical IDs, you have to consider this: Because it looks like that:
So the updating of tokens in your DB for those tokens which are refreshed in FCM cloud would be mostly done in the method So, it seems that is not very likely that you are going to receive |
Thanks @culebras for the very detailed writeup! Can I add this question and answer to the README? Because I think many people wonder how to interpret the FCM responses correctly. 👍 |
Yes, sure! |
I have updated the README and included this discussion. Thanks for your valuable summary! Please reopen this ticket, if there are any additional questions. |
Hello,
As part of error handling when sending NotificationMulticastMessage, I need to map erroneous FcmMessageResultItem to the token that caused an error. Ex: typical use case is to remove not registered tokens from my db.
Can i rely on the order of FcmMessageResultItems in the FcmMessageResponse? Does it correspond to the order of registrationIds provided in the constructor of NotificationMulticastMessage?
If this is not true, how can I do such mapping?
Thanks in advance
Sla
The text was updated successfully, but these errors were encountered: