I started integrating GCM into my Android app. Using the startup tutorial I installed a sample demo and it works great. I also understood the different response states received when my server sends a message to GCM, which I think means the status of the connection between my server and the GCM server.
My question is: is there a way to get the communication status between the GCM server and the android application? This is basically a confirmation, meaning that the message was sent successfully or not. I also read that the default timeout is 4 weeks if the time_to_live flag is not set, which allows me to understand that GCM supports the queue and will definitely ensure message delivery.
However, to ensure reliability as a third-party server, will I ever need to redo the sending of the same message (if it is not already captured by the GCM infrastructure)? if I need to take care of a retry, how to identify a failure?
One way: to determine the push identifier and send it along with the message, as soon as it is received, the android application will inform the server with the corresponding push identifier. If no response is received within the specified time, the server will resend the message. This approach is defined in the second post answer and will help control the time spent by GCM (specifically for the QA team).
android google-cloud-messaging
Mukesh bhojwani
source share