JavaPNS icon indicating copy to clipboard operation
JavaPNS copied to clipboard

No Response

Open pc6n opened this issue 9 years ago • 0 comments

I try to get a Respons from the APNS but the Respons is always = null..

try{ if ( !isConnected){ initializeConnection(); } List<Device> deviceList = Devices.asDevices(receivers); for (Device device: deviceList){ try{ //validate Token BasicDevice.validateTokenFormat(device.getToken()); PushedNotification notification = pushManager.sendNotification(device, payload, false); if(notification.getResponse()!=null){ notification.getResponse().getMessage(); } notifications.add(notification); }catch(InvalidDeviceTokenFormatException e){ notifications.add(new PushedNotification(device, payload, e)); } } }catch(CommunicationException e){ stopConnection(); throw e; } }

I tried it with an invalid token but it doesnt work

pc6n avatar Sep 07 '16 09:09 pc6n