2

I have a problem understanding how the 'Restrict background data' setting in Android really works. I always thought that with this restriction turned on, only visible applications could download data, but currently I'm developing an application that has shaken this understanding... My application registers an alarm in AlarmService to start a background IntentService every 5 minutes. This service will then download the latest financial quotes. What is surprising to me, is that no matter what the 'Restrict background data' setting is, the service is able to download the data over WIFI (didn't try with cellular interface yet).

So my question is, how does 'Restrict background data' setting in Android really work? Also should I worry about it in the case of my application and are there any differences in the behaviour of this option depending on the version of Android (I've checked on 2.3.3 Samsung Galaxy SII)?

4

2 回答 2

2

Android中的“限制后台数据”设置如何真正起作用?

对于 Android 1.x/2.x/3.x,它是开发人员的“选择加入”设置。开发人员应检查是否不允许使用后台数据,如果不允许,则不要在后台执行此操作。

对于 Android 4.0+,如果用户的应用程序要求(例如,您已超过分配的带宽阈值),Android 基本上会阻止您进行 Internet 访问。

于 2012-11-06T17:14:50.307 回答
1

对于冰淇淋三明治,它特别指出限制背景选项仅适用于数据,不限制 WiFi。

于 2013-02-05T15:04:30.843 回答