I’m making a chat with a notification service. Sometimes that the notifications dont arrives to my device. I’m using JavaPNS, so my code isn’t very complex, but when I send a lot of messages very quickly (about 10) from one device to another, I don’t receive all the notifications. Some of them are lost in the way (generally one of two).
Here is my code:
PushNotificationPayload payload = PushNotificationPayload.complex();
payload.addAlert("Name : text"); payload.addSound("default");
payload.addBadge(1);
payload.addCustomDictionary("type", NOTIF_MESSAGE);
Push.payload(payload, "******.p12", "password", false, URI);
It’s OK.
–Local and Push Notification Programming Guide.