FCM seldom Fails on Android device


FCM seldom Fails on Android device



I've built an application to send instant message via FCM to Android devices by Json WebRequest.



The application works fine but it seldom fail when the application posts to FCM server, and then may continuously fail for a while.



FCM returns the same fail message below but I have no idea what's happening:


{"multicast_id":6888830314994897268,"success":0,"failure":1,"canonical_ids":0,"results":[{"message_id":null}]}



I found this documentation says that:



For Android there is a limit of 100 messages that can be stored
without collapsing. If the limit is reached, all stored messages are
discarded. When the device is back online, it receives a special
message indicating that the limit was reached. The app can then handle
the situation properly, typically by requesting a full sync from the
app server.



But my Android devices do receive all of the messages the server sent when it is powered on.



Is there any thing I missed?



Any help will be appreciated.



Update



I did my FCM push notification code like this example.



Parse returning JSON message by



var response = JsonConvert.DeserializeObject<FcmResponse>(json);


var response = JsonConvert.DeserializeObject<FcmResponse>(json);





but it seldom fail when the application posts to FCM server, and then may continuously fail for a while. It would be awesome if you could provide a Minimal, Complete, and Verifiable example.
– mjwills
2 days ago


but it seldom fail when the application posts to FCM server, and then may continuously fail for a while.





OK, I think I did provide the fail message as example above. The fail messages in my log are always the same. I sent all message with same data structure and the fail message didn't show anything about what's wrong. I haven't saved the log when success. If you would like to see all things while communicate please tell me, I will log all of the things and wait for it failed again.
– Terry Wei
2 days ago










By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

how to run turtle graphics in Colaboratory

Export result set on Dbeaver to CSV