sshcheung / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

PushedNotifications object returned by Push.alert() is empty. #146

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Make a push.alert/ push.payload call passign sufficient arguments

2. No exception is thrown 
3. notifications size is coming as zero.

What is the expected output? What do you see instead?

Expected responce is i should be getting the pushednotifications back, error or 
success. But not empty. 

What version of the product are you using? On what operating system?
2.2, Window 7

Please provide any additional information below.

Code to push 

PushedNotifications notifications = Push.alert(message,
            AppProperties.getAPNKeystorePath(), AppProperties
                .getAPNPassword(), false, new ArrayList<String>(deviceTokens));
logger.info("notifications: " + notifications.size()); // this displays zero
// never enters this loop
for (PushedNotification notification : notifications) {
          logger.info(notification.getLatestTransmissionAttempt() + " was "
              + notification.isSuccessful());
}

Original issue reported on code.google.com by ghazal.m...@gmail.com on 22 Sep 2012 at 7:27

GoogleCodeExporter commented 8 years ago
Please provide the complete log output that is generated by JavaPNS.

Original comment by sype...@gmail.com on 22 Sep 2012 at 1:14

GoogleCodeExporter commented 8 years ago
Sorry, my bad. My deviceTokens list was empty so it was not even generating any 
JavaPNS logs. Works fine now, Thanks. 

Original comment by ghazal.m...@gmail.com on 22 Sep 2012 at 2:25

GoogleCodeExporter commented 8 years ago

Original comment by sype...@gmail.com on 22 Sep 2012 at 3:02