可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I need to send push notifications to iOS devices, from my Java server, using Apple Push Notification Service (APNS)
I found two libraries to send APNS push notifications in Java:
- java-apns
- javapns
But both seem to be abandoned (or at least they have bugs and the last release is a year ago).
java-apns has lots of forks. Is there any updated fork of this library in active development? Are there any other better choices?
回答1:
If anybody else is looking for an APNs library in Java, we at RelayRides just released Pushy (http://relayrides.github.io/pushy/). It does some things differently than the other two contenders (like async network IO), so it can send large numbers of messages really quickly. We actually use it in production, too, so it's actively maintained by our engineers. Enjoy!
EDIT: To be clear, Pushy is free and open-source (MIT license).
回答2:
After digging around for a while, I could only find those two libraries you mentioned so
I looked at some of the most recent forks on the java-apns GitHub page and the most recent one I could find was done by a user under the name "froh42". His fork is located here. The latest commit was 4 days ago, but I'm not sure if this person is actually adding to the repo's core functionality or not since it's very late and I'm too tired to check.
My suggestion would be, if you're going to use java-apns, to look at froh's repo and see if it checks out or not. If it doesn't, you can view the list of forks from the original java-apns repo here. Sorry I couldn't be of more help to you and good luck!
回答3:
I faced the same issue a few month back with a Java backend for one of our apps and after searching for libraries (Which in fact wasn't even a possible option on the Google App Engine) I found Urban Airship.
Urban Airship is a middle man between your backend and the various push notification services (it does support APNS, but as well android / blackberry / Win). You just need to configure your Push service on their platform, implement a REST call to one of their endpoint and done!
They have free plan starting with 1 Million (1.000.000) notifications / month.
Really good service so far and it's giving us the ability to quickly scale to other push services without having to implement specific code on our server side.
回答4:
Looks like java-apns is being updated. Last commit was 1 month ago...
https://github.com/notnoop/java-apns
I haven't used it yet but seems at least the project is not dead...
回答5:
Finally I decide to use JavaPNS (https://code.google.com/p/javapns/) on my project, is easy to use and meets my requirements.
But I recently found a new project that looks very promising and I'm planning to use in a near future.
Inside of the AeroGear project there are several libraries. One of them is the AeroGear UnifiedPush Server with support to Apple’s APNs, Google Cloud Messaging and Mozilla’s Simple Push.
Also has client libraries (iOS, Android) to easy integration with server:
- Android tutorial
- iOS tutorial
Also has other some cool features like, Administration console, Java Sender client API, Rest API, ...
Hope it helps to someone else.
回答6:
I use javapns, so far I didn't see issues (My project is still on development progress); But I saw the project wasn't updated since 2 years ago.
and java-apns is keeping update, I will have a try.
Updated my answer, I started to use pushy for APN since 3 month ago, it really has better performance. Now I suggest to use pushy.
回答7:
I would not recomment JavaPns
if you intend to use it's queue mode
because you want to send many messages at a time. There's a really nasty Bug which makes you lose push notifications, but the library says, everything was sent.
回答8:
This one is very good i have used it
https://github.com/notnoop/java-apns
I have also tried javaapns
https://code.google.com/p/javapns/
but some how it was not worked for me. It was giving me success = true on sending notification but my device was not able to receive it.