Closed GoogleCodeExporter closed 9 years ago
According to your log:
10:12:35,968 DEBUG PushNotificationManager:? - Notification sent
How is your iPhone app configured?
Does the iPhone display the message when your app is not running?
- if so, then be sure to register your app with the apns service on the phone (sorry I don't know the details)
If the iPhone doesn't get the notice, please verify that your app has enabled
apns services via the apple dev portal.
Original comment by idbill.p...@gmail.com
on 5 Oct 2010 at 3:21
Thanks for your replay and my apologies for what i'had sent to you because the
problem was that my iphone was connected to another wifi lan that not have
enabled port 5223.
But another question if is possible, how do you reconnect if the connection
goes down when sending a payload ? can i put all my code in a while(true) end
retry with "initializeConnection" as long as is ok ?
Thanks for all your attention
Original comment by lasek1...@gmail.com
on 11 Oct 2010 at 8:50
Thanks for your replay and my apologies for what i'had sent to you because the
problem was that my iphone was connected to another wifi lan that not have
enabled port 5223.
But another question if is possible, how do you reconnect if the connection
goes down when sending a payload ? can i put all my code in a while(true) end
retry with "initializeConnection" as long as is ok ?
Thanks for all your attention
Original comment by lasek1...@gmail.com
on 11 Oct 2010 at 8:50
Interesting. I was under the assumption that apns always used the cell
connection. Any information you provide about the port 5223 block would be
interesting to me. (In my environment, our firewall blocks 5223, but I can
still receive push notifications, but we have good cell service.)
As per other peoples experience, you should not maintain a connection with the
apn service over a long period of time.
The docs indicate 'You should also retain connections with APNs across multiple
notifications' and 'you should batch multiple notifications in a single
transmission over the interface'. To me this indicates they want users to batch
notifications and send them all at once (like on a cron), and not as the
notifications are created... But this does not specifically say that servers
should maintain a connection over a period of time.
So in answer to the question, if you get connected... then you should send the
notifications. If a payload fails, the javapns lib should throw an exception
which you can catch, so the while seems redundant.
References:
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Concept
ual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html
Original comment by idbill.p...@gmail.com
on 11 Oct 2010 at 5:04
Original comment by idbill.p...@gmail.com
on 16 Oct 2010 at 9:34
Original issue reported on code.google.com by
lasek1...@gmail.com
on 5 Oct 2010 at 8:55Attachments: