Giter Site home page Giter Site logo

Comments (12)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
As per the Apple spec, the APNService accepts what is sent to it, and nothing 
is returned.

So what error packet would be returned?

Original comment by [email protected] on 17 Apr 2011 at 4:33

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
For enhanced notification format, "If you send a notification and APNs finds 
the notification malformed or otherwise unintelligible, it returns an 
error-response packet prior to disconnecting. (If there is no error, APNs 
doesn’t return anything.) ". APNs defines status code of 1-8 indicating 
different errors. 

I thought I should receive error response for missing device token, but I got 
nothing back. Just wonder in what kind of situation, error-response can be sent 
back by the APNs. 

Thanks.

Weiping

Original comment by [email protected] on 18 Apr 2011 at 2:27

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
What you are looking for is the Feedback Service:

http://code.google.com/p/javapns/wiki/FeedbackBasicExample

Original comment by [email protected] on 22 Apr 2011 at 9:18

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
I think Feedback service is another issue. What I am looking for is error 
response, please see:

https://github.com/notnoop/java-apns/blob/master/src/main/java/com/notnoop/apns/
internal/ApnsConnectionImpl.java

Original comment by [email protected] on 23 Apr 2011 at 12:46

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
This appears to be a new feature.

Original comment by [email protected] on 25 Apr 2011 at 5:18

  • Changed state: Accepted

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
The existing code uses the 'Simple notification format' which does not return 
an error EVER.

See docs at:
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Concept
ual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html

I've tried updating to the 'Enhanced notification format' which is supposed to 
return an error, but I'm unable to get any errors back from the APNS.

With the Enhanced format, the connection isn't being dropped immediately after 
sending data, but I'm not getting anything back from my 
socket.getInputSocket.read() call.

This issue will have to be tabled until I have more time to troubleshoot.

Original comment by [email protected] on 26 Apr 2011 at 12:44

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Thanks a lot for looking into it. I got the same result as yours. Maybe it has 
something to do with Apple Gateway. 

Weiping

Original comment by [email protected] on 26 Apr 2011 at 1:04

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Thanks a lot for looking into it. I got the same result as yours. Maybe it has 
something to do with Apple Gateway. 

Weiping

Original comment by [email protected] on 26 Apr 2011 at 1:04

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024

Original comment by [email protected] on 9 Sep 2011 at 7:20

  • Changed title: Receiving error-response packet with enhanced notification format

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Re-labeling as an enhancement request.   

IMHO, since the library itself makes it difficult to push malformed 
notifications (validates tokens before push, JSON payload is generated 
programmatically, etc.), I believe the need for this is less relevant than if 
one were to write JSON payloads manually and then be more susceptible to 
payload format or content errors.  Still, it would be interesting to have 
support for this in a later version, even though the probability of receiving 
anything other than NO_ERROR is quite low because of how the library shields 
you from building invalid payloads.

Original comment by [email protected] on 14 Sep 2011 at 4:31

  • Added labels: Priority-Low, Type-Enhancement
  • Removed labels: Priority-Medium, Type-Defect

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Update:  javapns 2.0 Beta 4 includes full support for streaming messages with 
the enhanced notification format.  This was the first step in adding support 
for error packets.  

Additional note:  after review of 1.x code, it appears that the library did 
include a preliminary attempt at supporting error packets (this is what was 
freezing the library in the sendNotification method in 1.6).  However, the code 
never worked because it was executed within the same thread, instead of being 
delegated to a monitoring thread that is not blocking the notification thread.  
More work needs to be done to recover, adapt and enhance that code to support 
the requested feature.

Original comment by [email protected] on 15 Sep 2011 at 7:29

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Fixed in 2.0 Beta 5.

Details: 
All push methods now return response-enabled notification results (as 
javapns.notification.PushedNotification objects).  The new error-response 
packet reader automatically updates PushedNotification objects at the end of a 
connection so that you can find out what a transmission error was, if any 
occurred.

Original comment by [email protected] on 27 Sep 2011 at 1:20

  • Changed state: Fixed

from javapns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.