1

I am trying to implement voip notification server using java. I tried javapns and java-apns.The problems I am facing are:

1.With javapns I am able to send voip notification but unable to receive it on device.

Push.alert(message,"path/to/Voip_certificate_P12.p12", "password",true,"voip_device_id");

2.with java-apns(notnoop)library I am unable to compile the code.

I am constantly getting this error: Could not initialize class com.notnoop.apns.internal.Utilities
I tried it with different java-apns jar versions and slf4j jar versions, but getting the same error. I have gone through almost all the post regarding this issue but could not resolve the issue.

Any help would be great. Is there any library that implements push-kit framework in java?

ArK
  • 20,698
  • 67
  • 109
  • 136
nikhil
  • 65
  • 2
  • 9

1 Answers1

2

I finally figured out what to do to send voip notifications to voip application on ios. I was able to achieve the desired result with javapns library. Here is list of things one needs to do:

  1. Get a good knowledge of what type of certificates you need and what you already have.If there is any doubt about any certificate please clear it there and then only.

  2. Once you are done with #1. Do a double check :p(looks funny but highly recommended.50% of problems are caused by wrong certificates only).

  3. Javapns is what I used(I tried notnoop but it has lot of dependencies). It is very simple to use.

  4. push and voip notifiations are sent to same socket to APNS. It is APNS that reads the certificate and key(there are different keys for push and voip notifications), and decides if it needs to send a normal push notification or a voip notification.

  5. You need to implement pushkit framework in your client(didReceiveIncomingPushWithPayload method is called when voip notifaications are received).

The voip message will be received by your device and it will start in the background. But there wont be any alert on the screen. So it is up to you to decide how you want to use it. I generated a local notification to alert the user.

This is a very useful link: stackoverflow.com.

Community
  • 1
  • 1
nikhil
  • 65
  • 2
  • 9