Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Apple Push Notification Service Java library should I use? [closed]

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:

  1. java-apns
  2. 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?

like image 687
sabadow Avatar asked Jan 18 '13 11:01

sabadow


People also ask

Can I disable Apple push service?

You can disable push notifications on Android by going into the Settings > Notifications options. Similar to iOS, Android lets you turn off push notifications for individual apps or use a 'Do not disturb' mode.

Are Apple push notifications guaranteed?

The system makes every attempt to deliver local and remote notifications in a timely manner, but delivery isn't guaranteed. The PushKit framework offers a more timely delivery mechanism for specific types of notifications, such as those VoIP and watchOS complications use.

What does Apple Push Notification Service do?

Apple Push Notification service (APNs) is a cloud service that allows approved third-party apps installed on Apple devices to send push notifications from a remote server to users over a secure connection. For example, a newstand app might use APNs to send a text alert to an iPhone user about a breaking news story.

What is APNs priority?

apns-priority. The priority of the notification. If you omit this header, APNs sets the notification priority to 10 . Specify 10 to send the notification immediately. Specify 5 to send the notification based on power considerations on the user's device.


2 Answers

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).

EDIT: Project has moved to https://github.com/jchambers/pushy

like image 69
Jon Chambers Avatar answered Oct 09 '22 16:10

Jon Chambers


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 [dead]. 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!

Note: Do not use any of your libraries since those are based on the Binary Provider API which will stop working from Nov. 2020!

like image 35
stevenelberger Avatar answered Oct 09 '22 18:10

stevenelberger