Skip to content

No Response #19

Description

@pc6n

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions