Comments (12)
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.
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.
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.
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.
This appears to be a new feature.
Original comment by [email protected]
on 25 Apr 2011 at 5:18
- Changed state: Accepted
from javapns.
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.
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.
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.
Original comment by [email protected]
on 9 Sep 2011 at 7:20
- Changed title: Receiving error-response packet with enhanced notification format
from javapns.
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.
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.
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)
- invalid token error HOT 5
- encountered "KeystoreException (Keystore contains too many certificates)" HOT 3
- Apple dropping support for SSL 3.0 on push notification servers, requiring TLS by October 29th HOT 3
- JavaAPN can't work on Windows but Mac OS is fine, why???? HOT 3
- Feature request: configurable or parameterized time waiting on socket HOT 4
- Feature request: configurable or parameterized retry policy HOT 3
- Creating certificates step-by-step link broken HOT 1
- thread terminated after reached max msg send HOT 3
- Exception reporting not working for multiple payloads
- Responses not read? HOT 1
- Javapns Communication exception:Connection refused to ConnectionToAppleServer
- support for title-loc-key (ios 8.2)
- Unable to connect APNS - CommunicationException - java.net.ConnectionException : Communication Timed Out HOT 2
- Duplicate notifications being sent out at high rate
- Add content-available to PushNotificationPayload
- Do you support VoIP push notifications?
- javaapns does not supports log4j 2
- Exception java.net.SocketException
- Javapns Notifications SSL Exceptions and Closed Sockets HOT 1
- thead lake
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javapns.