java-apns icon indicating copy to clipboard operation
java-apns copied to clipboard

Check if notification was sent

Open raderio opened this issue 7 years ago • 3 comments

How to check if notification was sent successfully?

com.notnoop.apns.ApnsService service = APNS.newService()
                .withCert(...)
                .withAppleDestination(true)
                .build();
ApnsNotification response = service.push(token, payload);

response should be null? it throw an exception?

I am asking because I never get an error, but sometimes notifications are not coming.

raderio avatar Nov 20 '17 08:11 raderio

+1

cthinkel avatar Dec 12 '17 22:12 cthinkel

Same issue here:

For example, I have 5 device tokens. Assume that the 3rd token ist invalid, all others are valid.

My Expectation: 4 out of 5 devices receive a notification ( = all but device with invalid token number 3) Actuall behavior: Only the first two devices get a notification. Starting with the 3rd token, which is invalid, no other valid token works.

The library tells me, all notifications are successfully sent. I can ask the service for invalid invalid devices, but I do not get any result. Neither before sending the notification, nor after sending the notification.

Any hints on how to overcome this?

tuxedo0801 avatar Dec 18 '17 07:12 tuxedo0801

Same issue, Once It encounters Invalid device token, it stops processing subsequent device token. Is there any way at least to know if notification was un-succesful. ApnsNotification does not have any useful method wrt above case.

Input will be appriciated

sandeeprewa avatar Jan 31 '18 11:01 sandeeprewa