I have downloaded and setup the Android gcm-client and gcm-demo-server (http server) from http://code.google.com/p/gcm/ . I have managed to receive downstream messages in my Android gcm-client app. I have done numerous tests with the following characteristics:
- The server used either a browser API key or a server API key.
- The data connection was either 3G or WiFi
- The sent message included/didn't include additional data.
- The sent message had/didn't have a collapse key.
- The sent message had delayWhileIdle set to false.
- The sent message had timeToLive set to 0 or 5 minutes.
- The server was located in two different locations within Europe.
- The Android app run in two devices located in different places within Europe.
In all cases the app receives the sent messages after 25-30 sec from the moment they were sent. However, I have tested other Android applications that use GCM downstream messages and in most cases the messages arrive almost instantly (<5sec).
Is there something I can change in the client or server in order to have the messages received in the app sooner?
I also tried to use the gcm XMPP server (Java application using Smack) given in http://developer.android.com/google/gcm/ccs.html but I didn't manage to sent any messages. The response I receive from GCM Cloud Connection Server (CCS) says "Project XXXXXXXXXX not whitelisted". The most possible reason is that my registration for CCM has not been approved yet as described in Google CCS (GCM) - project not whitelisted . As I have read in various websites, the approval usually takes more than 2-3 months, so I will most possibly not be able to test the XMPP server soon.
Is it possible that you can only receive nearly instant messages by using an XMPP server? Does anybody have any experience of the delays encountered using an XMPP server?
Thanks in advance