Adham
Adham

Reputation: 64854

Can I depend on GCM service to create a big instant messaging application ?

If I want to create an instant messaging application using android, is it a good and efficient to use the Google Cloud Messaging API ?

Upvotes: 0

Views: 78

Answers (2)

Marcelo Idemax
Marcelo Idemax

Reputation: 2810

There are a lot of mentions in GCM documentation and tutorial saying that is no guarantee of order and success receive of messages. Like here:

Note that since there is no guarantee of the order in which messages get sent, the "last" message may not actually be the last message sent by the application server.

I suggest you use this as a call to update user chat e.g. when your app get a GCM you request your server-side to get the new messages but not transfer messages by GCM itself also because you have some dayly limits as well.

See more here: http://developer.android.com/google/gcm/index.html

I found the mention above here: http://developer.android.com/google/gcm/server.html. At description of collapse_key here: http://developer.android.com/google/gcm/server.html#params

Upvotes: 1

Yale
Yale

Reputation: 333

Yes, it works for Google and you won't have to maintain servers. If your message is short, in can be included in the GCM message. Otherwise the GCM could be a payload to notify your app to check for a new message.

Upvotes: 0

Related Questions