I am building a mobile application that has some realtime constraints. Therefore I turn to stackoverflow to get advices & opinions and attempt to decide which is the best solution to update the state of the application while running:
Beyond the fact that APNS and C2DM provide a unified interface to push notification while the application is running or not, one can say that a custom solution (based on long-polling or a direct connection) is more flexible and less dependent on the latency of Apple & Android queues.
As far as I can see, I think most of the debate stems from the cost comparison of how much battery it consumes to keep a connection opened compared to opening a connection on a smartphone.
I am therefore particularly interested in two things:
References welcome! Thanks!
dependent on the latency of Apple & Android queues
I don't think that's true. It's up to the app developer and the server side implementation how much time this takes. I get my email pushed to my phone before my browser client gets it. And not just gmail, my corporate e-mail as well.
As for your question, you should work with whatever works best. Or even better, you should give the user the option to use push notifications or to set the polling period.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With