How does Android C2DM improve bandwidth useage?
Asked Answered
A

1

1

I keep reading that using Android C2DM is the most efficient solution, bandwidth wise, for keeping track of updates. However, I'm missing exactly how C2DM is more efficient then say, a solution that does polling every 5 minutes.

My understanding is: C2DM works by maintaining a persistent TCP/IP connection. Maintaining said connection means keeping the radio on (I think this is where I'm wrong?) http://developer.android.com/training/efficient-downloads/efficient-network-access.html

So wouldn't keeping the TCP/IP connection open keep the radio on at all times, even if it is in low-power mode?

While polling every 5 minutes, even width the latency is the radio turning on/off, would for a 3 second download, keep the radio in high power mode for 5 seconds and low power mode for 12 seconds (latency shutting down).

Thanks for any help clearing this up.

Archdiocese answered 17/7, 2012 at 16:23 Comment(3)
keep in mind that many users' devices will already be connected to C2DM for services such as gmail, so for those users you don't use any more battery by using C2DM in your application. If you create your own polling service, many users will have both C2DM and your polling service going on at the same time.Schlosser
Wouldn't keeping C2DM on mean that the radio is kept on so my polling wouldn't use more bandwidth? Although I see your point about starting a new services drain on the battery, combined with the fact Android can kill my service at any time.Archdiocese
Wait I've been stupidly using bandwidth when I mean battery power. 1) Does keeping the connection on use any data and 2) is it more battery efficient, in a device where there isn't already a C2DM sync running?Archdiocese
T
0

Instead of polling the server for changes which uses bw and data, the server will notify you when something have changed so only then you can retrieve the changes.

Tilt answered 17/7, 2012 at 16:35 Comment(1)
Oh I understand. This wasn't exactly what I was looking for, but it answered my question. My problem is I hadn't phrased my question completely. I can understand how using C2DM saves bandwidth - you can poll when there's no new data. What I should have asked though, is does using C2DM over polling save any battery life?Archdiocese

© 2022 - 2024 — McMap. All rights reserved.