Menu

#348 Check if notification was sent

open
nobody
None
2018-01-31
2017-11-20
Anonymous
No

Originally created by: raderio

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.

Discussion

  • Anonymous

    Anonymous - 2017-12-12

    Originally posted by: cthinkel

    +1

     
  • Anonymous

    Anonymous - 2017-12-18

    Originally posted by: tuxedo0801

    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?

     
  • Anonymous

    Anonymous - 2018-01-31

    Originally posted by: sandeeprewa

    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

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.