Answer the question
In order to leave comments, you need to log in
GCM as a single transport for instant messenger on android, ios, is it worth it?
Good evening to all those who are reading this now
There is a task to create a messenger for ios / android.
There is a classic old school option: keep the connection to your XMPP server yourself when the application is in the foreground and rely on GCM/APNS when the application is in the background. On the server, check - if the user is connected - send xmpp, if disabled - push.
But as it turned out recently, GCM also supports iOS, and beckons with its free and unlimited.
Google says that GCM uses APNS to deliver messages to iOS, but it doesn’t say - is it all the time or only when the background application (and the rest of the time keeps its own connection)? It is also not clear how things are with delivery control, because APNS does not have it?
Hopefully APNS is only used to "wake up" GCM's own delivery mechanisms.
Also, many complained about GCM about the delivery time, but now there are fewer such issues, which is encouraging.
In general, if someone has infa how GCM works on iOS or real experience, please express your opinion.
Should it be used as the single and only transport for all messages?
Answer the question
In order to leave comments, you need to log in
Neither GCM nor APNS guarantee instant delivery of a message, so making them the basis of a chat/messenger is not advisable. Those. in the worst case, messages between interlocutors will arrive with a delay on which it is worth imposing delays associated with network problems.
Most instant messengers establish a socket connection during user communication. As soon as the need for it disappears, it is torn (forced or by itself), and notifications of new messages come through APNS / GCM.
ps xmpp is not the best choice. Even somewhere an article on Habré was from the developers who wrote the messenger.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question