From ec4ec27ea6062ed460e662be2239ce169ff2d134 Mon Sep 17 00:00:00 2001 From: Katie McCormick Date: Fri, 27 Jul 2012 11:15:17 -0700 Subject: cherrypick from master docs: Battery class C2DM -> GCM Change-Id: If5fe0034ae0bb72c321b591f84e79acbaf2e36f1 Change-Id: I6342d1a3925d43719358d905fc29f2628c6e92b4 --- docs/html/training/efficient-downloads/regular_updates.jd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/html/training') diff --git a/docs/html/training/efficient-downloads/regular_updates.jd b/docs/html/training/efficient-downloads/regular_updates.jd index feb7a8ef07e9..262d67677d94 100644 --- a/docs/html/training/efficient-downloads/regular_updates.jd +++ b/docs/html/training/efficient-downloads/regular_updates.jd @@ -15,14 +15,14 @@ next.link=redundant_redundant.html

This lesson teaches you to

    -
  1. Use Cloud to Device Messaging as an alternative to polling
  2. +
  3. Use Google Cloud Messaging as an alternative to polling
  4. Optimize polling with inexact repeating alarms and exponential back-offs

You should also read

@@ -34,17 +34,17 @@ next.link=redundant_redundant.html

This lesson will examine how your refresh frequency can be varied to best mitigate the effect of background updates on the underlying wireless radio state machine.

-

Use Cloud to Device Messaging as an Alternative to Polling

+

Use Google Cloud Messaging as an Alternative to Polling

Every time your app polls your server to check if an update is required, you activate the wireless radio, drawing power unnecessarily, for up to 20 seconds on a typical 3G connection.

-

Android Cloud to Device Messaging (C2DM) is a lightweight mechanism used to transmit data from a server to a particular app instance. Using C2DM, your server can notify your app running on a particular device that there is new data available for it.

+

Google Cloud Messaging for Android (GCM) is a lightweight mechanism used to transmit data from a server to a particular app instance. Using GCM, your server can notify your app running on a particular device that there is new data available for it.

Compared to polling, where your app must regularly ping the server to query for new data, this event-driven model allows your app to create a new connection only when it knows there is data to download.

The result is a reduction in unnecessary connections, and a reduced latency for updated data within your application.

-

C2DM is implemented using a persistent TCP/IP connection. While it's possible to implement your own push service, it's best practice to use C2DM. This minimizes the number of persistent connections and allows the platform to optimize bandwidth and minimize the associated impact on battery life.

+

GCM is implemented using a persistent TCP/IP connection. While it's possible to implement your own push service, it's best practice to use GCM. This minimizes the number of persistent connections and allows the platform to optimize bandwidth and minimize the associated impact on battery life.

Optimize Polling with Inexact Repeating Alarms and Exponential Backoffs

@@ -99,4 +99,4 @@ executeUpdateOrPrefetch(); } } -

Alternatively, for transfers that are failure tolerant (such as regular updates), you can simply ignore failed connection and transfer attempts.

\ No newline at end of file +

Alternatively, for transfers that are failure tolerant (such as regular updates), you can simply ignore failed connection and transfer attempts.

-- cgit v1.2.3-59-g8ed1b