When I used Android versions up to 2.x, some apps like Google Talk and Android Market (now Play Store) required background synchronization to be activated via Settings -> Account and synchronization -> Background data. I recently upgraded to Ice Cream Sandwich and noticed that both Google Talk and Play Store now work also when that setting is switched off.

Do such apps still require background synchronization, possibly in a way that is no longer controlled by a user-accessible setting?

2 Answers
2

As of ICE_CREAM_SANDWICH, availability of background data depends on several combined factors, and this method will always return true. Instead, when background data is unavailable, getActiveNetworkInfo() will now appear disconnected.

Vending (the internal name for the Android Market, in fact com.android.vending) uses C2DM to receive install requests (take a look at its application manifest; even on ICS, it still has c2dm receivers). AFAIK, C2DM only works when background data is available.

Some time ago, I read a blog post somewhere (which unfortunately I am not finding right now) explaining how the Android Market (the post was from before it was renamed) worked. IIRC, even when you asked to install an application directly on your device (instead of indirectly via the https://market.android.com/ web site), all it did was to send a request to the Google servers, which then sent your device (via C2DM) an install request. This explains why Vending needs background data—it cannot do anything without being able to receive requests via C2DM from the Google servers.

I do not know about Google Talk, but from what I have heard, it has used C2DM since before C2DM was available to the public. Again, this would explain why it needs background data to work.

AFAIK, background sync is completely separate from background data, other than the fact that obviously it cannot sync in the background if background data is disabled, and the fact that you could change it from within the sync screen in the settings application.

I have a Samsung Galaxy Nexus running ICS 4.0.4. When I navigate to the Settings->Accounts & Synchronization screen and select an account (specifically the account I use for Google Talk and the Google Play store) those two apps are not present in the list of apps that can be enabled / disabled for background synchronization. If these apps are performing background synchronization, it is no longer a user settable option to disable it.