Hi!
We specified a value of 3600 (1 hour) for the ttl field in the push message
structure. We detected that in case of iOs devices, that were offline just a
short time (e.g. 20 seconds) no pushes were received. For android everything
seems fine.
Looking at the code (APNsPushNotificationSender#createFutureDateBasedOnTTL)
we can see that the expiry date seems to be computed incorrectly:
---
return new Date(System.currentTimeMillis() + ttl);
---
ttl is the time-to-live in seconds. In this case ttl should be multiplied
with 1000!
So this explains our symptoms. Or am i missing anything here?
Further question/issue: When specifying ttl=-1 we detected, that our ios
device also didn't receive any push notifications after some short time
beeing offline. Can anybody explain why? We thought apns would store the
push message for several weeks in that case. When the device was online we
however successfully received pushes with ttl=-1. Any clue whats going on
here?
p.s.: our message looks something like that:
---
{"message":{"badge":1,"alert":"You have new
messages","sound":"NotificationSound.aiff","user-data":{"room_id":"77bf84a5aa254da0b916bc0e7b0f1f7d","type":"message"},"apns":{"content-available":true}},"criteria":{"alias":["HGEUZTM7"]},"config":{"ttl":-1}}
---
Regards, Gunther Klein
--
View this message in context:
http://aerogear-users.1116366.n5.nabble.com/Aerogear-UPS-1-1-0-Severe-TTL...
Sent from the aerogear-users mailing list archive at
Nabble.com.