On Monday, July 23, 2012 5:38:34 PM UTC-7, Robert Greenwalt wrote:
>
> In versions 4.0 and greater, if you app has background data turned off (by 
> the user) AND you are in the background and ask for the current active 
> network and check if it's connected, you will find it's not connected 
> (it'll be BLOCKED).  In fact, if you try to access the network you will 
> fail.
>
> If either your background data setting is off OR you are in the foreground 
> you will be told you are connected (provided a connection, of course).
>

I'm guessing a service, even with a foreground notification, is going to be 
considered to be in the background, right?

It's possible that this has already gotten me a few support messages from 
people saying that a download isn't making progress. But there are so many 
user errors and server side errors that I'm not sure, even now, if this is 
one of the first questions I will ask. 

On Galaxy Nexus, the phone wouldn't let me access this setting unless I set 
a data limit (assuming I found the right setting), gave me some warnings, 
and posted what I think is a persistent notification. This might be enough 
to make a user aware, but you never know since many users don't know how to 
find notifications (the secret pulldown).  

In an activity, it does seem to make sense to note that data has been 
blocked. For a batch download service, it seems like it would make sense to 
check this at the very beginning and simply abort the operation, as this is 
unlikely to change, unlike connectivity. 

Nathan 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to