I need to send push notification using a control panel from server.
The server is a Linux virtual Cloud box which is behind a proxy. The control panel is designed using J2EE with Tomcat
I am using JAVA based https://github.com/notnoop/java-apns/releases API for push
The code
ApnsService service = APNS.newService().withSandboxDestination().withCert("mycert.p12", "mypassword").build();
String messageTobeSent = APNS.newPayload()
.alertBody("Message with badge 2")
.badge(2)
.alertTitle("Message with badge 2")
.sound("ding.wav")
.build();
service.push("d81f0080ed7bf05ac96261dc1805fbf00230073f606f1388a644469b1893446f", messageTobeSent, new Date());
I am getting an error Couldn't connect to APNS server, My Questions are
- Is this because of the proxy?
- Does APNs works with proxy?
- Will this library capable or connecting behind proxy?