No Response
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