[android-developers] How to check if background data is enabled?

2010-12-20 Thread Achie
I want to check if the user enabled background data on his/her device and display a message if it is disabled. How can I check if it has been enabled? I tried Settings.System.getString(getContentResolver(), Settings.Secure.BACKGROUND_DATA); and Settings.Secure.getString(getContentResolver(),

Re: [android-developers] How to check if background data is enabled?

2010-12-20 Thread Mark Murphy
Use getBackgroundDataSetting() on ConnectivityManager. If you really feel you need to get it from Settings, use: Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.BACKGROUND_DATA, 1) == 1 to get a boolean indicator. On Mon, Dec 20, 2010 at 5:07 PM, Achie

Re: [android-developers] How to check if background data is enabled?

2010-12-20 Thread Kostya Vasilyev
It's in ConnectivityManager, there is also a broadcast for when the user changes this setting. -- Kostya Vasilyev -- http://kmansoft.wordpress.com 21.12.2010 1:08 пользователь Achie krishna.acha...@gmail.com написал: I want to check if the user enabled background data on his/her device and