Reputation: 113
I have created an app that send messages between devices using GCM , the thing is if i want to send several messages in a row its possible that one of the sent messages wont be sent instantly and will be delayed.
My scenario is : I have tried to send 3 messages in a row , i received the first and the third one but couldn't receive the second one !! One day after I received the second message , how could this be possible ? Is there any way to sync the sending ? and why it took the second message 24 hours to be received ?
Upvotes: 0
Views: 17
Reputation: 2264
Google is very clear about how you get no guarantee that a message will arrive at all.
In other words, don't depend on messages getting delivered. Your system needs to be robust enough to handle this. Perhaps periodically check. Definitely check if the backend has stored messages you did not receive yet.
If you purely rely on GCM delivering your (chat?) messages, then users will very quickly uninstall your app, because it will be faulty.
Upvotes: 1