4.0 Flow Control Preference

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.