I am using GCM for sending messages to android devices in batches of max size 1000.
Problem 1: Sometimes I recieves responses where the Reponse codes from the GCM are less than the GCM ids and I dont know the status of my requests
Problem 2:Due to this i am unable to track the canonical ids , uninstalls and other error codes
As per the GCM doc the responses are in the same order and number as the GCM ids. Other than order there is no way of finding which response is for which gcmid.
When the reponses are same in number as ids I can map them by order
When the responses are not same in number then there is no way of knowing that the responses for which ids were missed.
The code that is being used is a follows:
Message message = new Message.Builder()
.collapseKey(request.getCollapseKey())
.timeToLive(request.getTimeToLive())
.delayWhileIdle(request.isDelayWhileIdle())
.addData(Constants.MESSAGE, userMsg)
.build();
MulticastResult result = sender.send(message, request.getPushIds(), request.getRetryCount());
logger.info("Messages has been pushed successfully for Android with ids : "+result.toString() + "GCM Id : "+request.getPushIds().toString());
if(result.size()!=request.getPushIds().size())
{
logger.warn("Size mismatch between pushids("+request.getPushIds().size()+") and results("+result.size()+")");
}
This attached excerpt captures the case when there is a mismatch warning as: Size mismatch between pushids(549) and results(572)
--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/7d0db90b-3b0e-43ef-bfb3-5088c7be0e1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.