From Android4.0 onwards, the system Setup application allows users to see how much network data their app uses in the foreground and back office. Users can disable the use of network data in the background for each app. To prevent users from disabling your app to access the network in the background, you should use the network more efficiently and allow users to improve data usage through the settings of your app.
For example, you might allow users to control how often your app synchronizes data, whether your app uploads downloaded data only under WiFi, whether it accesses the network while roaming, and so on.
When you add the necessary preference to your preferenceactivity to control your app's data access habits, you should add a intent filter to your preferenceactivity. Example:
<activity android:name= "Settingsactivity" ... >
<intent-filter>
<action android:name= "Android.intent.action.MANAGE_NETWORK_USAGE"/>
<category android:name= "Android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
This intent-filter tells the system that activity is the activity that controls the amount of data used by your application. So, when users query the system setup application for how much data your app uses, a button that looks at "app settings" can load your preferenceactivity, and users can improve how your app should use the data.
4.0 Flow Control Preference