Friday, February 26, 2016

Do Google Talk and Play Store still require background sync on Ice Cream Sandwich?


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?



Answer



Yes, background data is always enabled since Ice Cream Sandwich. See the note in the documentation for android.net.ConnectivityManager.getBackgroundDataSetting():




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.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...