Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Response #19

Open
pc11000 opened this issue Sep 7, 2016 · 0 comments
Open

No Response #19

pc11000 opened this issue Sep 7, 2016 · 0 comments

Comments

@pc11000
Copy link

pc11000 commented Sep 7, 2016

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

try{
if ( !isConnected){
initializeConnection();
}
List 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant